authorgravatar for datamanrb@gmail.comdata-man <datamanrb@gmail.com> 2019-12-07 02:39:04+05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-12-06 16:41:02-05:00
log008e42f48351453b2174b361847c5470e6216fa5
treed6494c15416f2881c5ff06db35ff687a64ccdec0
parent525b1e8fb4abc38143a6ae47272fd5d016ba7eeb

getStdOut fixes


2 files changed, 2 insertions(+), 2 deletions(-)

lib/std/hash/benchmark.zig+1-1
...@@ -181,7 +181,7 @@ fn printPad(stdout: var, s: []const u8) !void {...@@ -181,7 +181,7 @@ fn printPad(stdout: var, s: []const u8) !void {
181}181}
182182
183pub fn main() !void {183pub fn main() !void {
184 var stdout_file = try std.io.getStdOut();184 var stdout_file = std.io.getStdOut();
185 var stdout_out_stream = stdout_file.outStream();185 var stdout_out_stream = stdout_file.outStream();
186 const stdout = &stdout_out_stream.stream;186 const stdout = &stdout_out_stream.stream;
187187
lib/std/zig/perf_test.zig+1-1
...@@ -23,7 +23,7 @@ pub fn main() !void {...@@ -23,7 +23,7 @@ pub fn main() !void {
23 const bytes_per_sec = @intToFloat(f64, source.len * iterations) / elapsed_s;23 const bytes_per_sec = @intToFloat(f64, source.len * iterations) / elapsed_s;
24 const mb_per_sec = bytes_per_sec / (1024 * 1024);24 const mb_per_sec = bytes_per_sec / (1024 * 1024);
2525
26 var stdout_file = try std.io.getStdOut();26 var stdout_file = std.io.getStdOut();
27 const stdout = &stdout_file.outStream().stream;27 const stdout = &stdout_file.outStream().stream;
28 try stdout.print("{:.3} MiB/s, {} KiB used \n", mb_per_sec, memory_used / 1024);28 try stdout.print("{:.3} MiB/s, {} KiB used \n", mb_per_sec, memory_used / 1024);
29}29}