From 35efd14aa037e16afacde385187f9fcbf1edfbb0 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 54ae43c..02ded6b 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(); @@ -62,7 +59,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 117d955..b42619c 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(); @@ -24,5 +21,5 @@ pub fn main() !void { } }.h); - try app.listen(io, "0.0.0.0:3000"); + try app.listen("0.0.0.0:3000"); }