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