zig fmt: Fix erroneously commented out code, add passing test case to close #5722
parent
ea6181aaf6
commit
9f0821e688
|
@ -3429,6 +3429,21 @@ test "zig fmt: Control flow statement as body of blockless if" {
|
|||
);
|
||||
}
|
||||
|
||||
test "zig fmt: " {
|
||||
try testCanonical(
|
||||
\\pub fn sendViewTags(self: Self) void {
|
||||
\\ var it = ViewStack(View).iterator(self.output.views.first, std.math.maxInt(u32));
|
||||
\\ while (it.next()) |node|
|
||||
\\ view_tags.append(node.view.current_tags) catch {
|
||||
\\ c.wl_resource_post_no_memory(self.wl_resource);
|
||||
\\ log.crit(.river_status, "out of memory", .{});
|
||||
\\ return;
|
||||
\\ };
|
||||
\\}
|
||||
\\
|
||||
);
|
||||
}
|
||||
|
||||
const std = @import("std");
|
||||
const mem = std.mem;
|
||||
const warn = std.debug.warn;
|
||||
|
|
|
@ -1762,7 +1762,7 @@ fn renderExpression(
|
|||
}
|
||||
|
||||
if (while_node.payload) |payload| {
|
||||
const payload_space = Space.Space; //if (while_node.continue_expr != null) Space.Space else block_start_space;
|
||||
const payload_space = if (while_node.continue_expr != null) Space.Space else block_start_space;
|
||||
try renderExpression(allocator, ais, tree, payload, payload_space);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue