mirror of
https://codeberg.org/fairyglade/ly.git
synced 2026-08-09 07:09:13 +02:00
style(main): replace if else with catch
This commit is contained in:
parent
13233851dd
commit
509dd8ab4c
1 changed files with 2 additions and 2 deletions
|
|
@ -240,10 +240,10 @@ pub fn main(init: std.process.Init) !void {
|
|||
// Test for presence of Lua config file first
|
||||
// If it fails, fall back to ini
|
||||
var config_path = try std.Io.Dir.path.join(state.allocator, &[_][]const u8{ config_parent_path, "config.lua" });
|
||||
if (std.Io.Dir.accessAbsolute(state.io, config_path, .{})) |_| {} else |_| {
|
||||
std.Io.Dir.accessAbsolute(state.io, config_path, .{}) catch {
|
||||
state.allocator.free(config_path);
|
||||
config_path = try std.Io.Dir.path.join(state.allocator, &[_][]const u8{ config_parent_path, "config.ini" });
|
||||
}
|
||||
};
|
||||
defer state.allocator.free(config_path);
|
||||
|
||||
custom.binds = .empty;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue