Commit 63a45b8ecd

Ryan Liptak <squeek502@hotmail.com>
2025-10-26 05:28:54
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
Changed files (1)
lib/std/SinglyLinkedList.zig
@@ -86,7 +86,7 @@ pub fn prepend(list: *SinglyLinkedList, new_node: *Node) void {
 }
 
 /// Remove `node` from the list.
-/// Assumes `node` is in 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;