mirror of
https://codeberg.org/fairyglade/ly.git
synced 2026-08-22 21:44:20 +02:00
zig fmt
This commit is contained in:
parent
f8a314aa73
commit
f99b214f5e
1 changed files with 16 additions and 16 deletions
32
src/main.zig
32
src/main.zig
|
|
@ -225,20 +225,20 @@ pub fn main() !void {
|
|||
var config_parser = try IniParser(Config).init(state.allocator, config_path, migrator.configFieldHandler);
|
||||
defer config_parser.deinit();
|
||||
defer if (!shutdown or !restart) {
|
||||
var iter = custom.binds.iterator();
|
||||
while (iter.next()) |i| {
|
||||
temporary_allocator.free(i.key_ptr.*);
|
||||
temporary_allocator.free(i.value_ptr.*.cmd);
|
||||
temporary_allocator.free(i.value_ptr.*.name);
|
||||
}
|
||||
custom.binds.deinit();
|
||||
var labelIter = custom.labels.iterator();
|
||||
while (labelIter.next()) |i| {
|
||||
temporary_allocator.free(i.key_ptr.*);
|
||||
if (i.value_ptr.cmd) |cmd|
|
||||
temporary_allocator.free(cmd);
|
||||
}
|
||||
custom.labels.deinit();
|
||||
var iter = custom.binds.iterator();
|
||||
while (iter.next()) |i| {
|
||||
temporary_allocator.free(i.key_ptr.*);
|
||||
temporary_allocator.free(i.value_ptr.*.cmd);
|
||||
temporary_allocator.free(i.value_ptr.*.name);
|
||||
}
|
||||
custom.binds.deinit();
|
||||
var labelIter = custom.labels.iterator();
|
||||
while (labelIter.next()) |i| {
|
||||
temporary_allocator.free(i.key_ptr.*);
|
||||
if (i.value_ptr.cmd) |cmd|
|
||||
temporary_allocator.free(cmd);
|
||||
}
|
||||
custom.labels.deinit();
|
||||
};
|
||||
|
||||
state.config = config_parser.structure;
|
||||
|
|
@ -1096,7 +1096,7 @@ pub fn main() !void {
|
|||
latest.info.counter = 1;
|
||||
}
|
||||
defer for (state.custom_info.items) |*item| {
|
||||
item.lbl.deinit();
|
||||
item.lbl.deinit();
|
||||
};
|
||||
|
||||
var iter = custom.binds.iterator();
|
||||
|
|
@ -1122,7 +1122,7 @@ pub fn main() !void {
|
|||
state.custom_binds.items[state.custom_binds.items.len - 1].lbl.allocator = state.allocator;
|
||||
}
|
||||
defer for (state.custom_binds.items) |*i| {
|
||||
i.lbl.deinit();
|
||||
i.lbl.deinit();
|
||||
};
|
||||
|
||||
if (!state.config.hide_key_hints) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue