cli: use a caller-provided write buffer

This follows Zig's conventions more closely, where the caller owns the
write buffer.
This commit is contained in:
Jon Parise
2026-03-29 08:18:29 -04:00
parent 4a0cca1c5b
commit 62f8a1cbcf
2 changed files with 7 additions and 8 deletions

View File

@@ -94,7 +94,8 @@ pub fn run(alloc: Allocator) !u8 {
var pager: Pager = if (!no_pager) .init(alloc) else .{};
defer pager.deinit();
const writer = pager.writer();
var buffer: [4096]u8 = undefined;
const writer = pager.writer(&buffer);
if (text) |t| {
try writer.writeAll(t);