Skip to content

Commit 63a45b8

Browse files
committed
SinglyLinkedList.remove docs: Assumes -> asserts
Removing a node that is not in the list invokes safety-checked illegal behavior, so "asserts" is the recommended language to use.
1 parent a83db33 commit 63a45b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/std/SinglyLinkedList.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub fn prepend(list: *SinglyLinkedList, new_node: *Node) void {
8686
}
8787

8888
/// Remove `node` from the list.
89-
/// Assumes `node` is in the list.
89+
/// Asserts that `node` is in the list.
9090
pub fn remove(list: *SinglyLinkedList, node: *Node) void {
9191
if (list.first == node) {
9292
list.first = node.next;

0 commit comments

Comments
 (0)