diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-12-06 17:23:07 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-12-23 22:15:07 -0800 |
| commit | 3204fb756980c19b7a95534acdd7a1bba837fbc3 (patch) | |
| tree | 45b5525ead2923de83ea85eacca351da64d55c46 /lib/std/Progress.zig | |
| parent | 1b1fb7fab623e40f4ddc24d7b5ef7e48949e8a17 (diff) | |
| download | zig-3204fb756980c19b7a95534acdd7a1bba837fbc3.tar.gz zig-3204fb756980c19b7a95534acdd7a1bba837fbc3.zip | |
update all occurrences of std.fs.File to std.Io.File
Diffstat (limited to 'lib/std/Progress.zig')
| -rw-r--r-- | lib/std/Progress.zig | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/std/Progress.zig b/lib/std/Progress.zig index 467d4754ff..d8b22c2db0 100644 --- a/lib/std/Progress.zig +++ b/lib/std/Progress.zig @@ -1,19 +1,21 @@ //! This API is non-allocating, non-fallible, thread-safe, and lock-free. +const Progress = @This(); -const std = @import("std"); const builtin = @import("builtin"); +const is_big_endian = builtin.cpu.arch.endian() == .big; +const is_windows = builtin.os.tag == .windows; + +const std = @import("std"); +const Io = std.Io; const windows = std.os.windows; const testing = std.testing; const assert = std.debug.assert; -const Progress = @This(); const posix = std.posix; -const is_big_endian = builtin.cpu.arch.endian() == .big; -const is_windows = builtin.os.tag == .windows; const Writer = std.Io.Writer; /// `null` if the current node (and its children) should /// not print on update() -terminal: std.fs.File, +terminal: Io.File, terminal_mode: TerminalMode, @@ -472,7 +474,7 @@ pub fn start(options: Options) Node { if (options.disable_printing) { return Node.none; } - const stderr: std.fs.File = .stderr(); + const stderr: Io.File = .stderr(); global_progress.terminal = stderr; if (stderr.enableAnsiEscapeCodes()) |_| { global_progress.terminal_mode = .ansi_escape_codes; @@ -633,8 +635,8 @@ pub fn unlockStdErr() void { /// Protected by `stderr_mutex`. const stderr_writer: *Writer = &stderr_file_writer.interface; /// Protected by `stderr_mutex`. -var stderr_file_writer: std.fs.File.Writer = .{ - .interface = std.fs.File.Writer.initInterface(&.{}), +var stderr_file_writer: Io.File.Writer = .{ + .interface = Io.File.Writer.initInterface(&.{}), .file = if (is_windows) undefined else .stderr(), .mode = .streaming, }; |
