diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-06-28 06:59:11 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-07-07 22:43:51 -0700 |
| commit | 0b3f0124dc33403d329fb8ee63a93215d9af1f1e (patch) | |
| tree | 3a94c321398ab21810b73c55411523d005b503fa /lib/compiler/std-docs.zig | |
| parent | 7c42517151cf06b67268aec3be715b3e303e014a (diff) | |
| download | zig-0b3f0124dc33403d329fb8ee63a93215d9af1f1e.tar.gz zig-0b3f0124dc33403d329fb8ee63a93215d9af1f1e.zip | |
std.io: move getStdIn, getStdOut, getStdErr functions to fs.File
preparing to rearrange std.io namespace into an interface
how to upgrade:
std.io.getStdIn() -> std.fs.File.stdin()
std.io.getStdOut() -> std.fs.File.stdout()
std.io.getStdErr() -> std.fs.File.stderr()
Diffstat (limited to 'lib/compiler/std-docs.zig')
| -rw-r--r-- | lib/compiler/std-docs.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compiler/std-docs.zig b/lib/compiler/std-docs.zig index 6247077527..b5bc742717 100644 --- a/lib/compiler/std-docs.zig +++ b/lib/compiler/std-docs.zig @@ -7,7 +7,7 @@ const assert = std.debug.assert; const Cache = std.Build.Cache; fn usage() noreturn { - io.getStdOut().writeAll( + std.fs.File.stdout().writeAll( \\Usage: zig std [options] \\ \\Options: @@ -63,7 +63,7 @@ pub fn main() !void { var http_server = try address.listen(.{}); const port = http_server.listen_address.in.getPort(); const url_with_newline = try std.fmt.allocPrint(arena, "http://127.0.0.1:{d}/\n", .{port}); - std.io.getStdOut().writeAll(url_with_newline) catch {}; + std.fs.File.stdout().writeAll(url_with_newline) catch {}; if (should_open_browser) { openBrowserTab(gpa, url_with_newline[0 .. url_with_newline.len - 1 :'\n']) catch |err| { std.log.err("unable to open browser: {s}", .{@errorName(err)}); |
