diff --git a/lib/std/DoublyLinkedList.zig b/lib/std/DoublyLinkedList.zig index dcc656bf43751c3d9dcff68dc1a7175425a5b855..b7a5ed2e112cb926396261047becfebcc934f553 100644 --- a/lib/std/DoublyLinkedList.zig +++ b/lib/std/DoublyLinkedList.zig @@ -105,6 +105,7 @@ pub fn prepend(list: *DoublyLinkedList, new_node: *Node) void { } /// Remove a node from the list. +/// Assumes the node is in the list. /// /// Arguments: /// node: Pointer to the node to be removed. diff --git a/lib/std/SinglyLinkedList.zig b/lib/std/SinglyLinkedList.zig index d118ce0395a5075d6984ddcd72ac94967ea0de04..3952bf4233e59a60d5a07a18ab8864342562d4dc 100644 --- a/lib/std/SinglyLinkedList.zig +++ b/lib/std/SinglyLinkedList.zig @@ -85,6 +85,8 @@ pub fn prepend(list: *SinglyLinkedList, new_node: *Node) void { list.first = new_node; } +/// Remove `node` from the list. +/// Asserts that `node` is in the list. pub fn remove(list: *SinglyLinkedList, node: *Node) void { if (list.first == node) { list.first = node.next;