fix: restrict return type of exit_normal and exit_fmt
This commit is contained in:
parent
1da74bfb5c
commit
e44e6ed306
1 changed files with 2 additions and 2 deletions
|
@ -241,7 +241,7 @@ fn store_stack_trace(a: std.mem.Allocator, stack_trace: std.builtin.StackTrace,
|
|||
}
|
||||
}
|
||||
|
||||
pub fn exit_normal() result {
|
||||
pub fn exit_normal() error{Exit} {
|
||||
return set_error_msg(exit_message("normal", null));
|
||||
}
|
||||
|
||||
|
@ -249,7 +249,7 @@ pub fn exit(e: []const u8) error{Exit} {
|
|||
return set_error_msg(exit_message(e, null));
|
||||
}
|
||||
|
||||
pub fn exit_fmt(comptime fmt: anytype, args: anytype) result {
|
||||
pub fn exit_fmt(comptime fmt: anytype, args: anytype) error{Exit} {
|
||||
var buf: [1024]u8 = undefined;
|
||||
const msg = std.fmt.bufPrint(&buf, fmt, args) catch "FMTERROR";
|
||||
return set_error_msg(exit_message(msg, null));
|
||||
|
|
Loading…
Add table
Reference in a new issue