std: Use {s} instead of {} when printing strings

This commit is contained in:
LemonBoy
2020-11-26 09:48:12 +01:00
committed by Andrew Kelley
parent 5a06fdfa55
commit dd973fb365
32 changed files with 771 additions and 231 deletions

View File

@@ -186,7 +186,7 @@ pub const Thread = struct {
@compileError(bad_startfn_ret);
}
startFn(arg) catch |err| {
std.debug.warn("error: {}\n", .{@errorName(err)});
std.debug.warn("error: {s}\n", .{@errorName(err)});
if (@errorReturnTrace()) |trace| {
std.debug.dumpStackTrace(trace.*);
}
@@ -247,7 +247,7 @@ pub const Thread = struct {
@compileError(bad_startfn_ret);
}
startFn(arg) catch |err| {
std.debug.warn("error: {}\n", .{@errorName(err)});
std.debug.warn("error: {s}\n", .{@errorName(err)});
if (@errorReturnTrace()) |trace| {
std.debug.dumpStackTrace(trace.*);
}
@@ -281,7 +281,7 @@ pub const Thread = struct {
@compileError(bad_startfn_ret);
}
startFn(arg) catch |err| {
std.debug.warn("error: {}\n", .{@errorName(err)});
std.debug.warn("error: {s}\n", .{@errorName(err)});
if (@errorReturnTrace()) |trace| {
std.debug.dumpStackTrace(trace.*);
}