From 67a07f84e95ba43cc448712cf33951fcb8a5557c Mon Sep 17 00:00:00 2001 From: codev911 Date: Mon, 18 May 2026 07:15:26 +0700 Subject: [PATCH] refactor: simplify listen() API in examples Remove manual std.Io.Threaded/io boilerplate from examples to match the new simplified App.listen(address) signature in ziez core. Co-Authored-By: Claude Opus 4.7 --- README.md | 5 +---- examples/basic.zig | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6732ab5..4895aa8 100644 --- a/README.md +++ b/README.md @@ -45,9 +45,6 @@ pub fn main() !void { defer _ = gpa.deinit(); const allocator = gpa.allocator(); - var threaded = std.Io.Threaded.init_single_threaded; - const io = threaded.io(); - var app = ziez.init(allocator); defer app.deinit(); @@ -63,7 +60,7 @@ pub fn main() !void { } }.h); - try app.listen(io, "0.0.0.0:3000"); + try app.listen("0.0.0.0:3000"); } ``` diff --git a/examples/basic.zig b/examples/basic.zig index d8917f9..b5096a9 100644 --- a/examples/basic.zig +++ b/examples/basic.zig @@ -7,9 +7,6 @@ pub fn main() !void { defer _ = gpa.deinit(); const allocator = gpa.allocator(); - var threaded = std.Io.Threaded.init_single_threaded; - const io = threaded.io(); - var app = ziez.init(allocator); defer app.deinit(); @@ -25,5 +22,5 @@ pub fn main() !void { } }.h); - try app.listen(io, "0.0.0.0:3000"); + try app.listen("0.0.0.0:3000"); }