Skip to content

Commit 9163e9a

Browse files
authored
Fix typo / small syntax improvement
1 parent fdb565d commit 9163e9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rust/0206-reverse-linked-list.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
impl Solution {
2-
pub fn reverse_list(mut head: Option<Box<ListNode>>) -> Option<Box<ListNode>> {
2+
pub fn reverse_list(head: Option<Box<ListNode>>) -> Option<Box<ListNode>> {
33
let (mut prev, mut curr) = (None, head);
44
while let Some(mut node) = curr{
55
curr = node.next;
66
node.next = prev;
77
prev = Some(node);
88
}
9-
pre
9+
prev
1010
}
1111
}

0 commit comments

Comments
 (0)