mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-08 07:50:00 +00:00
fixed compileError printing
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const print = @import("std").debug.print;
|
||||
const std = @import("std");
|
||||
const print = std.debug.print;
|
||||
|
||||
// We're going to (ab)use the power of Zig to make animal hybrid creatures!
|
||||
// What do you think a GatorMouse would look like? Eek.
|
||||
@@ -58,7 +59,7 @@ fn makeCreature(comptime count: usize, comptime fmt: []const u8) [count]Animal {
|
||||
// other animals or is this an error?
|
||||
'g' => ???,
|
||||
|
||||
else => @compileError("No animal starts with '" ++ char ++ "'!"),
|
||||
else => @compileError(std.fmt.comptimePrint("No animal starts with '{c}'!", .{char})),
|
||||
},
|
||||
|
||||
.l => switch (char) {
|
||||
|
||||
Reference in New Issue
Block a user