mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 16:26:08 +03:00
cli: arg parsing supports more int types
This commit is contained in:
@ -234,20 +234,18 @@ fn parseIntoField(
|
||||
|
||||
bool => try parseBool(value orelse "t"),
|
||||
|
||||
u8 => std.fmt.parseInt(
|
||||
u8,
|
||||
value orelse return error.ValueRequired,
|
||||
0,
|
||||
) catch return error.InvalidValue,
|
||||
|
||||
u32 => std.fmt.parseInt(
|
||||
inline u8,
|
||||
u16,
|
||||
u32,
|
||||
value orelse return error.ValueRequired,
|
||||
0,
|
||||
) catch return error.InvalidValue,
|
||||
|
||||
u64 => std.fmt.parseInt(
|
||||
u64,
|
||||
usize,
|
||||
i8,
|
||||
i16,
|
||||
i32,
|
||||
i64,
|
||||
isize,
|
||||
=> |Int| std.fmt.parseInt(
|
||||
Int,
|
||||
value orelse return error.ValueRequired,
|
||||
0,
|
||||
) catch return error.InvalidValue,
|
||||
|
Reference in New Issue
Block a user