diff --git a/build.zig.zon b/build.zig.zon index 5de2e40..0cdb35e 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -9,8 +9,8 @@ }, .dependencies = .{ .zigcli = .{ - .url = "https://github.com/jiacai2050/zigcli/archive/c5e98846758f78083ca3648b841ef67f472ae9b4.tar.gz", - .hash = "12200ac6f2432658825c5b3e5ef004a62821ed6e910bbc3a971b98516de9d1783d90", + .url = "https://github.com/jiacai2050/zigcli/archive/d48eba82af25c16f01faf759fb9c11aacfe58a99.tar.gz", + .hash = "1220e18590afc407a9e947f7c724a4be509adbbab916a5253efc0bb07457de955bf1", }, }, } diff --git a/src/12-03.zig b/src/12-03.zig index 8b48239..33bd61d 100644 --- a/src/12-03.zig +++ b/src/12-03.zig @@ -112,10 +112,6 @@ fn DoublyLinkedList(comptime T: type) type { return false; } - fn len(self: *Self) usize { - return self.len; - } - fn search(self: *Self, value: T) bool { var current: ?*Node = self.head; diff --git a/src/13-01.zig b/src/13-01.zig index f6fd216..d52d3a8 100644 --- a/src/13-01.zig +++ b/src/13-01.zig @@ -46,12 +46,12 @@ pub fn main() !void { } print("\n{s}Positionals{s}\n", .{ sep, sep }); - for (opt.positional_args.items, 0..) |arg, idx| { + for (opt.positional_args, 0..) |arg, idx| { print("{d}: {s}\n", .{ idx + 1, arg }); } // Provide a print_help util method print("\n{s}print_help{s}\n", .{ sep, sep }); const stdout = std.io.getStdOut(); - try opt.print_help(stdout.writer()); + try opt.printHelp(stdout.writer()); }