diff --git a/src/config/Config.zig b/src/config/Config.zig index 47174aa82..0bcfc743e 100644 --- a/src/config/Config.zig +++ b/src/config/Config.zig @@ -4214,7 +4214,7 @@ pub const Keybinds = struct { } var buffer_stream = std.io.fixedBufferStream(&buf); - try std.fmt.format(buffer_stream.writer(), "{}", .{k}); + std.fmt.format(buffer_stream.writer(), "{}", .{k}) catch return error.OutOfMemory; try v.formatEntries(&buffer_stream, formatter); } } diff --git a/src/input/Binding.zig b/src/input/Binding.zig index ebccac196..b451b5ec9 100644 --- a/src/input/Binding.zig +++ b/src/input/Binding.zig @@ -1171,7 +1171,7 @@ pub const Set = struct { var iter = set.bindings.iterator(); while (iter.next()) |binding| { buffer_stream.seekTo(pos) catch unreachable; // can't fail - try std.fmt.format(buffer_stream.writer(), ">{s}", .{binding.key_ptr.*}); + std.fmt.format(buffer_stream.writer(), ">{s}", .{binding.key_ptr.*}) catch return error.OutOfMemory; try binding.value_ptr.*.formatEntries(buffer_stream, formatter); } }, @@ -1179,7 +1179,7 @@ pub const Set = struct { .leaf => |leaf| { // When we get to the leaf, the buffer_stream contains // the full sequence of keys needed to reach this action. - try std.fmt.format(buffer_stream.writer(), "={s}", .{leaf.action}); + std.fmt.format(buffer_stream.writer(), "={s}", .{leaf.action}) catch return error.OutOfMemory; try formatter.formatEntry([]const u8, buffer_stream.getWritten()); }, }