mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-13 01:08:41 -09:00
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:
parent
456cde16df
commit
f7fe61194b
1 changed files with 7 additions and 6 deletions
13
src/main.zig
13
src/main.zig
|
|
@ -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 };
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue