From 8c4f395b1b6d5fcdedcbf9211ff28af8783ddcce Mon Sep 17 00:00:00 2001 From: snoire Date: Sun, 31 Aug 2025 20:21:26 +0800 Subject: [PATCH] replace deprecated GenericWriter with print API --- src/Node.zig | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Node.zig b/src/Node.zig index 15bb146..0ac5853 100644 --- a/src/Node.zig +++ b/src/Node.zig @@ -587,7 +587,7 @@ pub const Node = enum(u32) { var full_path: std.ArrayListUnmanaged(u8) = .initBuffer(buf); if (node == Node.root) { - full_path.fixedWriter().writeByte('/') catch { + full_path.printBounded("/", .{}) catch { @branchHint(.cold); return error.NoSpace; }; @@ -607,12 +607,11 @@ pub const Node = enum(u32) { while (try tag_iterator.next(&value)) |tuple| { switch (tuple.tag) { .begin_node => { - const writer = full_path.fixedWriter(); - writer.writeByte('/') catch { + full_path.printBounded("/", .{}) catch { @branchHint(.cold); return error.NoSpace; }; - writer.writeAll(value.begin_node) catch { + full_path.printBounded("{s}", .{value.begin_node}) catch { @branchHint(.cold); return error.NoSpace; };