aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2020-08-22 01:12:34 +0200
committerAndrew Kelley <andrew@ziglang.org>2020-08-22 02:47:39 -0400
commit9ab428185688896ab5b6d4bc924366d22bfe4ccd (patch)
tree9bf6d952e2ad03299c1e40bda62b6ca52fa9da2c /lib/std
parentf18b92ef3ab689749efd135968f0834478f9fffa (diff)
downloadzig-9ab428185688896ab5b6d4bc924366d22bfe4ccd.tar.gz
zig-9ab428185688896ab5b6d4bc924366d22bfe4ccd.zip
std: remove init functions from linked list nodes
These functions are rather useless and redundant as initializing the struct directly is just as easy: var node = TailQueue(u32).Node{ .data = 42 };
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/linked_list.zig12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/std/linked_list.zig b/lib/std/linked_list.zig
index 00e678e0ac..870b823aac 100644
--- a/lib/std/linked_list.zig
+++ b/lib/std/linked_list.zig
@@ -28,12 +28,6 @@ pub fn SinglyLinkedList(comptime T: type) type {
pub const Data = T;
- pub fn init(data: T) Node {
- return Node{
- .data = data,
- };
- }
-
/// Insert a new node after the current one.
///
/// Arguments:
@@ -175,12 +169,6 @@ pub fn TailQueue(comptime T: type) type {
prev: ?*Node = null,
next: ?*Node = null,
data: T,
-
- pub fn init(data: T) Node {
- return Node{
- .data = data,
- };
- }
};
first: ?*Node = null,