diff --git a/src/nightwatch.zig b/src/nightwatch.zig index b9f4431..85d22a5 100644 --- a/src/nightwatch.zig +++ b/src/nightwatch.zig @@ -72,7 +72,7 @@ pub fn watch(self: *@This(), path: []const u8) Error!void { } /// Stop watching a previously watched path -pub fn unwatch(self: *@This(), path: []const u8) Error!void { +pub fn unwatch(self: *@This(), path: []const u8) void { self.backend.remove_watch(self.allocator, path); } diff --git a/src/nightwatch_test.zig b/src/nightwatch_test.zig index d14ba6f..e364d8d 100644 --- a/src/nightwatch_test.zig +++ b/src/nightwatch_test.zig @@ -393,7 +393,7 @@ test "unwatch stops delivering events for that directory" { try std.testing.expect(th.hasChange(file1, .created)); // Stop watching, then create another file - must NOT appear. - try watcher.unwatch(tmp); + watcher.unwatch(tmp); const count_before = th.events.items.len; const file2 = try std.fmt.allocPrint(allocator, "{s}/after_unwatch.txt", .{tmp});