| ... | @@ -86,7 +86,7 @@ pub fn prepend(list: *SinglyLinkedList, new_node: *Node) void { | ... | @@ -86,7 +86,7 @@ pub fn prepend(list: *SinglyLinkedList, new_node: *Node) void { |
| 86 | } | 86 | } |
| 87 | | 87 | |
| 88 | /// Remove `node` from the list. | 88 | /// Remove `node` from the list. |
| 89 | /// Assumes `node` is in the list. | 89 | /// Asserts that `node` is in the list. |
| 90 | pub fn remove(list: *SinglyLinkedList, node: *Node) void { | 90 | pub fn remove(list: *SinglyLinkedList, node: *Node) void { |
| 91 | if (list.first == node) { | 91 | if (list.first == node) { |
| 92 | list.first = node.next; | 92 | list.first = node.next; |