From 9163e9a105e4714a5976771bfc820db76541f8a1 Mon Sep 17 00:00:00 2001 From: Leif Elliott <69766831+JustLeif@users.noreply.github.com> Date: Thu, 28 Dec 2023 14:46:45 -0500 Subject: [PATCH] Fix typo / small syntax improvement --- rust/0206-reverse-linked-list.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/0206-reverse-linked-list.rs b/rust/0206-reverse-linked-list.rs index f4caa0c83..d6935eb8a 100644 --- a/rust/0206-reverse-linked-list.rs +++ b/rust/0206-reverse-linked-list.rs @@ -1,11 +1,11 @@ impl Solution { - pub fn reverse_list(mut head: Option>) -> Option> { + pub fn reverse_list(head: Option>) -> Option> { let (mut prev, mut curr) = (None, head); while let Some(mut node) = curr{ curr = node.next; node.next = prev; prev = Some(node); } - pre + prev } }