Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
wlr-output-management: fix bug due to zig miscompilation
It looks like having the empty error capture |_| on the else branch of
the if statement causes the else branch to be ignored by the compiler.
This should be a compile error, as the condition of the if statement is
a bool, not an error union.
river/Root.zig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/river/Root.zig b/river/Root.zig
index 1a18da4..6418203 100644
--- a/river/Root.zig
+++ b/river/Root.zig
@@ -468,7 +468,7 @@ fn processOutputConfig(
self.removeOutput(output);
self.output_layout.remove(output.wlr_output);
}
- } else |_| {
+ } else {
std.log.scoped(.output_manager).err("failed to apply config to output {s}", .{
output.wlr_output.name,
});