diff --git a/problems/0024.两两交换链表中的节点.md b/problems/0024.两两交换链表中的节点.md index 4dc051aa..12912382 100644 --- a/problems/0024.两两交换链表中的节点.md +++ b/problems/0024.两两交换链表中的节点.md @@ -410,7 +410,7 @@ impl Solution { // 递归 impl Solution { pub fn swap_pairs(head: Option>) -> Option> { - if head == None || head.as_ref().unwrap().next == None { + if head.is_none() || head.as_ref().unwrap().next.is_none() { return head; }