mirror of
https://github.com/sloven-c/linked-list-a2.git
synced 2026-05-06 10:37:59 +00:00
fix
This commit is contained in:
@@ -58,7 +58,7 @@ fn LinkedList(comptime T: type) type {
|
|||||||
return iterator.value;
|
return iterator.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn remove(self: *Self, allocator: std.mem.Allocator, value: T) !bool {
|
fn remove(self: *Self, allocator: std.mem.Allocator, value: T) bool {
|
||||||
var prev: *Node = undefined;
|
var prev: *Node = undefined;
|
||||||
var iterator = self.head;
|
var iterator = self.head;
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ pub fn main() !void {
|
|||||||
try llist.front(allocator, 69);
|
try llist.front(allocator, 69);
|
||||||
|
|
||||||
const val: i32 = 1;
|
const val: i32 = 1;
|
||||||
_ = try llist.remove(allocator, val);
|
_ = llist.remove(allocator, val);
|
||||||
|
|
||||||
try llist.print();
|
try llist.print();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user