| ... | ... | @@ -325,6 +325,12 @@ pub const Node = struct { |
| 325 | 325 | return init(@enumFromInt(free_index), parent, name, estimated_total_items); |
| 326 | 326 | } |
| 327 | 327 | |
| 328 | pub fn startFmt(node: Node, estimated_total_items: usize, comptime format: []const u8, args: anytype) Node { |
| 329 | var buffer: [max_name_len]u8 = undefined; |
| 330 | const name = std.fmt.bufPrint(&buffer, format, args) catch &buffer; |
| 331 | return Node.start(node, name, estimated_total_items); |
| 332 | } |
| 333 | |
| 328 | 334 | /// This is the same as calling `start` and then `end` on the returned `Node`. Thread-safe. |
| 329 | 335 | pub fn completeOne(n: Node) void { |
| 330 | 336 | const index = n.index.unwrap() orelse return; |