We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
std.log
switch
1 parent f1da93a commit 13d5825Copy full SHA for 13d5825
lib/std/log.zig
@@ -85,12 +85,7 @@ pub const Level = enum {
85
debug,
86
87
/// Returns a string literal of the given level in full text form.
88
- pub fn asText(comptime self: Level) switch (self) {
89
- .err => @TypeOf("error"),
90
- .warn => @TypeOf("warning"),
91
- .info => @TypeOf("info"),
92
- .debug => @TypeOf("debug"),
93
- } {
+ pub fn asText(comptime self: Level) []const u8 {
94
return switch (self) {
95
.err => "error",
96
.warn => "warning",
0 commit comments