authorgravatar for eugenelf10@gmail.comTen Eugene <eugenelf10@gmail.com> 2026-08-26 15:50:26+05:00
committergravatar for squeek502@hotmail.comRyan Liptak <squeek502@hotmail.com> 2026-08-26 23:22:27+02:00
log896bd9e1538ed9d06ff6b212e3df1da978c7e34e
tree7ccd27e85254f353135e7f37431536c53d2cb563
parent9fea426e246a02ea350f9983edf27d97690fcd52

`std.SinglyLinkedList` and `std.DoublyLinkedList`: make pointer param const in `remove`

Closes #36638

2 files changed, 2 insertions(+), 2 deletions(-)

lib/std/DoublyLinkedList.zig+1-1
......@@ -109,7 +109,7 @@ pub fn prepend(list: *DoublyLinkedList, new_node: *Node) void {
109109///
110110/// Arguments:
111111/// node: Pointer to the node to be removed.
112pub fn remove(list: *DoublyLinkedList, node: *Node) void {
112pub fn remove(list: *DoublyLinkedList, node: *const Node) void {
113113 if (node.prev) |prev_node| {
114114 // Intermediate node.
115115 prev_node.next = node.next;
lib/std/SinglyLinkedList.zig+1-1
......@@ -87,7 +87,7 @@ pub fn prepend(list: *SinglyLinkedList, new_node: *Node) void {
8787
8888/// Remove `node` from the list.
8989/// Asserts that `node` is in the list.
90pub fn remove(list: *SinglyLinkedList, node: *Node) void {
90pub fn remove(list: *SinglyLinkedList, node: *const Node) void {
9191 if (list.first == node) {
9292 list.first = node.next;
9393 } else {