From 00ae1a21f2f4c63e9dd23e0f13a0e38157ed600f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Gr=C3=A9goire?= Date: Wed, 22 Jul 2026 17:00:13 -0400 Subject: [PATCH] rtl: add consts to List --- src/rtl/list.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rtl/list.zig b/src/rtl/list.zig index e907513..67907fd 100644 --- a/src/rtl/list.zig +++ b/src/rtl/list.zig @@ -33,7 +33,7 @@ pub const List = struct { } /// Return whether the list is empty. - pub fn is_empty(self: *List) bool { + pub fn is_empty(self: *const List) bool { return self.head.next == &self.head; } @@ -63,12 +63,12 @@ pub const List = struct { return self.head.prev; } - pub fn iterator(self: *List) Iterator { + pub fn iterator(self: *const List) Iterator { return .{ .head = &self.head, .current = self.head.next }; } pub const Iterator = struct { - head: *Entry, + head: *const Entry, current: *Entry, pub fn next(self: *Iterator) bool {