feat: add --version
This commit is contained in:
parent
f68fdfe013
commit
8662a3f7fd
3 changed files with 54 additions and 6 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue