Skip to content

Commit 7ee8742

Browse files
authored
replace deprecated GenericWriter with print API (#7)
1 parent 300d9bb commit 7ee8742

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Node.zig

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ pub const Node = enum(u32) {
587587
var full_path: std.ArrayListUnmanaged(u8) = .initBuffer(buf);
588588

589589
if (node == Node.root) {
590-
full_path.fixedWriter().writeByte('/') catch {
590+
full_path.printBounded("/", .{}) catch {
591591
@branchHint(.cold);
592592
return error.NoSpace;
593593
};
@@ -607,12 +607,11 @@ pub const Node = enum(u32) {
607607
while (try tag_iterator.next(&value)) |tuple| {
608608
switch (tuple.tag) {
609609
.begin_node => {
610-
const writer = full_path.fixedWriter();
611-
writer.writeByte('/') catch {
610+
full_path.printBounded("/", .{}) catch {
612611
@branchHint(.cold);
613612
return error.NoSpace;
614613
};
615-
writer.writeAll(value.begin_node) catch {
614+
full_path.printBounded("{s}", .{value.begin_node}) catch {
616615
@branchHint(.cold);
617616
return error.NoSpace;
618617
};

0 commit comments

Comments
 (0)