update to new panic interface

See https://github.com/ziglang/zig/pull/22594 .

Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>
This commit is contained in:
Eric Joldasov 2025-02-09 13:21:04 +05:00
parent 456cde16df
commit f7fe61194b
No known key found for this signature in database
GPG key ID: 5C9C69060686B588

View file

@ -62,12 +62,13 @@ pub const allocator = std.mem.Allocator{
// Custom panic impl to reset the terminal before spewing out an error message. // Custom panic impl to reset the terminal before spewing out an error message.
pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace, ret_addr: ?usize) noreturn { pub const panic = std.debug.FullPanic(struct {
@branchHint(.cold); pub fn panicFn(msg: []const u8, first_trace_addr: ?usize) noreturn {
ui.deinit(); @branchHint(.cold);
std.debug.panicImpl(error_return_trace, ret_addr orelse @returnAddress(), msg); ui.deinit();
} std.debug.defaultPanic(msg, first_trace_addr);
}
}.panicFn);
pub const config = struct { pub const config = struct {
pub const SortCol = enum { name, blocks, size, items, mtime }; pub const SortCol = enum { name, blocks, size, items, mtime };