From c835ec07b6fd76303e11ebf082df70fceb3891e3 Mon Sep 17 00:00:00 2001 From: fw_qaq Date: Wed, 29 Mar 2023 16:44:08 +0800 Subject: [PATCH] =?UTF-8?q?Update=2024.=20=E4=B8=A4=E4=B8=A4=E4=BA=A4?= =?UTF-8?q?=E6=8D=A2=E9=93=BE=E8=A1=A8=E4=B8=AD=E7=9A=84=E8=8A=82=E7=82=B9?= =?UTF-8?q?=20about=20rust=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problems/0024.两两交换链表中的节点.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }