From d3164b3824453d5e90513ce799c977d7749703cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Gr=C3=A9goire?= Date: Sat, 28 Mar 2026 10:09:03 -0400 Subject: [PATCH] docs(rtl): make comments imperative --- src/rtl/list.zig | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/rtl/list.zig b/src/rtl/list.zig index 3cba3eb..70fbf13 100644 --- a/src/rtl/list.zig +++ b/src/rtl/list.zig @@ -11,13 +11,13 @@ pub const List = struct { /// Previous element prev: *Entry = undefined, - /// Removes an entry from whatever list it's in + /// Remove an entry from whatever list it's in. pub fn remove(elem: *Entry) void { elem.prev.next = elem.next; elem.next.prev = elem.prev; } - /// Inserts elem before `before` + /// Insert elem before `before`. pub fn insert_before(elem: *Entry, before: *Entry) void { elem.prev = before.prev; elem.next = before; @@ -26,18 +26,18 @@ pub const List = struct { } }; - /// Initializes the list + /// Initialize the list. pub fn init(self: *List) void { self.head.next = &self.head; self.head.prev = &self.head; } - /// Returns whether the list is empty + /// Return whether the list is empty. pub fn is_empty(self: *List) bool { return self.head.next == &self.head; } - /// Inserts elem at the end of the list + /// Insert elem at the end of the list. pub fn insert_tail(self: *List, elem: *Entry) void { self.head.prev.next = elem; elem.next = &self.head; @@ -45,7 +45,7 @@ pub const List = struct { self.head.prev = elem; } - /// Inserts elem at the beginning of the list + /// Insert elem at the beginning of the list. pub fn insert_head(self: *List, elem: *Entry) void { self.head.next.prev = elem; elem.next = self.head.next; @@ -53,12 +53,12 @@ pub const List = struct { self.head.next = elem; } - /// Returns the first element of the list + /// Return the first element of the list. pub fn first(self: *List) *Entry { return self.head.next; } - /// Returns the last element of the list + /// Return the last element of the list. pub fn last(self: *List) *Entry { return self.head.prev; }