Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1d47b74

Browse files
Merge pull request youngyangyang04#1989 from fwqaaq/master
Update 24. 两两交换链表中的节点 about rust 优化
2 parents 86bbd55 + 0059953 commit 1d47b74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎problems/0024.两两交换链表中的节点.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ impl Solution {
409409
// 递归
410410
impl Solution {
411411
pub fn swap_pairs(head: Option<Box<ListNode>>) -> Option<Box<ListNode>> {
412-
if head==None|| head.as_ref().unwrap().next==None {
412+
if head.is_none() || head.as_ref().unwrap().next.is_none() {
413413
return head;
414414
}
415415

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /