| author | |
| committer | |
| log | 63a45b8ecdc9e4babd883be71dde1826f32b556f |
| tree | d1ecd9d7e85ebd6ecca25f37a647b7d6ac19b335 |
| parent | a83db33ba2d5fddcc453735a7a0d9b57c67739a8 |
Removing a node that is not in the list invokes safety-checked illegal behavior, so "asserts" is the recommended language to use.1 files changed, 1 insertions(+), 1 deletions(-)
lib/std/SinglyLinkedList.zig+1-1| ... | ... | @@ -86,7 +86,7 @@ pub fn prepend(list: *SinglyLinkedList, new_node: *Node) void { |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | /// Remove `node` from the list. |
| 89 | /// Assumes `node` is in the list. | |
| 89 | /// Asserts that `node` is in the list. | |
| 90 | 90 | pub fn remove(list: *SinglyLinkedList, node: *Node) void { |
| 91 | 91 | if (list.first == node) { |
| 92 | 92 | list.first = node.next; |