build(zig-0.16): update example code in README and examples/ for zig-0.16

This commit is contained in:
CJ van den Berg 2026-04-13 12:13:51 +02:00
parent 82b095bdb8
commit 815146c375
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
4 changed files with 16 additions and 17 deletions

View file

@ -38,10 +38,9 @@ const H = struct {
}
};
pub fn main() !void {
const allocator = std.heap.page_allocator;
pub fn main(init: std.process.Init) !void {
var h = H{ .handler = .{ .vtable = &H.vtable } };
var watcher = try Watcher.init(allocator, &h.handler);
var watcher = try Watcher.init(init.io, init.gpa, &h.handler);
defer watcher.deinit();
try watcher.watch(".");