aboutsummaryrefslogtreecommitdiff
path: root/std/linked_list.zig
diff options
context:
space:
mode:
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);