aboutsummaryrefslogtreecommitdiff
path: root/std/linked_list.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-01-09 09:56:24 -0500
committerAndrew Kelley <superjoe30@gmail.com>2018-01-09 09:56:24 -0500
commitd1d3dbc7b5bc986849db476e491300ffd18d4db5 (patch)
tree8ab3bb2b5b8a82edf18caca6e28dc8e74ab81d11 /std/linked_list.zig
parent5a8d87f5042b5ab86de7c72df4ce84a314878e40 (diff)
parent3c094116aae459b651934663a31981cf09cdb3e4 (diff)
downloadzig-d1d3dbc7b5bc986849db476e491300ffd18d4db5.tar.gz
zig-d1d3dbc7b5bc986849db476e491300ffd18d4db5.zip
Merge branch 'master' into llvm6
Diffstat (limited to 'std/linked_list.zig')
-rw-r--r--std/linked_list.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/std/linked_list.zig b/std/linked_list.zig
index c33db4424b..9536e9991a 100644
--- a/std/linked_list.zig
+++ b/std/linked_list.zig
@@ -199,11 +199,11 @@ test "basic linked list test" {
const allocator = debug.global_allocator;
var list = LinkedList(u32).init();
- var one = %%list.createNode(1, allocator);
- var two = %%list.createNode(2, allocator);
- var three = %%list.createNode(3, allocator);
- var four = %%list.createNode(4, allocator);
- var five = %%list.createNode(5, allocator);
+ var one = list.createNode(1, allocator) catch unreachable;
+ var two = list.createNode(2, allocator) catch unreachable;
+ var three = list.createNode(3, allocator) catch unreachable;
+ var four = list.createNode(4, allocator) catch unreachable;
+ var five = list.createNode(5, allocator) catch unreachable;
defer {
list.destroyNode(one, allocator);
list.destroyNode(two, allocator);