| ... | ... | @@ -28,12 +28,6 @@ pub fn SinglyLinkedList(comptime T: type) type { |
| 28 | 28 | |
| 29 | 29 | pub const Data = T; |
| 30 | 30 | |
| 31 | | pub fn init(data: T) Node { |
| 32 | | return Node{ |
| 33 | | .data = data, |
| 34 | | }; |
| 35 | | } |
| 36 | | |
| 37 | 31 | /// Insert a new node after the current one. |
| 38 | 32 | /// |
| 39 | 33 | /// Arguments: |
| ... | ... | @@ -175,12 +169,6 @@ pub fn TailQueue(comptime T: type) type { |
| 175 | 169 | prev: ?*Node = null, |
| 176 | 170 | next: ?*Node = null, |
| 177 | 171 | data: T, |
| 178 | | |
| 179 | | pub fn init(data: T) Node { |
| 180 | | return Node{ |
| 181 | | .data = data, |
| 182 | | }; |
| 183 | | } |
| 184 | 172 | }; |
| 185 | 173 | |
| 186 | 174 | first: ?*Node = null, |