feat: add --version

This commit is contained in:
CJ van den Berg 2026-03-14 18:01:32 +01:00
parent f68fdfe013
commit 8662a3f7fd
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
3 changed files with 54 additions and 6 deletions

View file

@ -238,8 +238,8 @@ pub fn add_watch(self: *@This(), allocator: std.mem.Allocator, path: []const u8)
self.arm(allocator) catch return error.WatchFailed;
}
pub fn remove_watch(self: *@This(), allocator: std.mem.Allocator, path: []const u8) void {
pub fn remove_watch(self: *@This(), allocator: std.mem.Allocator, path: []const u8) error{WatchFailed}!void {
if (self.watches.fetchSwapRemove(path)) |entry| allocator.free(entry.key);
self.stop_stream(allocator);
self.arm(allocator) catch {};
self.arm(allocator) catch return error.WatchFailed;
}