This is great Thomas, thanks! 🙏 Minor enhancement - noticed that you don't need to define current_next in reverse(). fn reverse(&mut self) { let mut current_head = self.head.take(); while let Some(mut current_node) = current_head { current_head = current_node.next.take(); current_node.next = self.head.take(); self.head = Some(current_node); } }
This is great Thomas, thanks! 🙏
Minor enhancement - noticed that you don't need to define current_next in reverse().
fn reverse(&mut self) {
let mut current_head = self.head.take();
while let Some(mut current_node) = current_head {
current_head = current_node.next.take();
current_node.next = self.head.take();
self.head = Some(current_node);
}
}
Nice video! Btw, what's the font you use in vim?
Great vid!, and I was wondering what software you use for drawing at 1:49?