Skip to content

Commit 0890d6f

Browse files
committed
Flush the writer in the example
1 parent 389ccab commit 0890d6f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ test "bench test" {
4343
try bench.add("My Benchmark", myBenchmark, .{});
4444
var buf: [1024]u8 = undefined;
4545
var stdout_= std.fs.File.stdout().writer(&buf);
46-
try bench.run(&stdout.interface);
46+
const writer = &stdout.interface;
47+
try bench.run(writer);
48+
try writer.flush();
4749
}
4850
```
4951

0 commit comments

Comments
 (0)