diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-08-09 16:28:19 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-09 16:28:19 -0700 |
| commit | 0a1a738320219961c0809a92ac7607a5525aa33e (patch) | |
| tree | 9d3e2bf0948d131628f12a1fa6a5f2242ef2f334 /src/Package | |
| parent | 14f11377cbcc4ff2da75e3dee9bb1d9e06013de1 (diff) | |
| parent | 045bb1489767961857085d89645de6bd1d17847d (diff) | |
| download | zig-0a1a738320219961c0809a92ac7607a5525aa33e.tar.gz zig-0a1a738320219961c0809a92ac7607a5525aa33e.zip | |
Merge pull request #24743 from ziglang/BufferedWriter
std.Io: delete BufferedWriter
Diffstat (limited to 'src/Package')
| -rw-r--r-- | src/Package/Fetch.zig | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/Package/Fetch.zig b/src/Package/Fetch.zig index 787630142c..bcfdc8cb19 100644 --- a/src/Package/Fetch.zig +++ b/src/Package/Fetch.zig @@ -1631,19 +1631,13 @@ fn computeHash(f: *Fetch, pkg_path: Cache.Path, filter: Filter) RunError!Compute } fn dumpHashInfo(all_files: []const *const HashedFile) !void { - const stdout: std.fs.File = .stdout(); - var bw = std.io.bufferedWriter(stdout.deprecatedWriter()); - const w = bw.writer(); - + var stdout_buffer: [1024]u8 = undefined; + var stdout_writer: fs.File.Writer = .initMode(.stdout(), &stdout_buffer, .streaming); + const w = &stdout_writer.interface; for (all_files) |hashed_file| { - try w.print("{s}: {x}: {s}\n", .{ - @tagName(hashed_file.kind), - &hashed_file.hash, - hashed_file.normalized_path, - }); + try w.print("{t}: {x}: {s}\n", .{ hashed_file.kind, &hashed_file.hash, hashed_file.normalized_path }); } - - try bw.flush(); + try w.flush(); } fn workerHashFile(dir: fs.Dir, hashed_file: *HashedFile) void { |
