summaryrefslogtreecommitdiff
path: root/exercises
diff options
context:
space:
mode:
Diffstat (limited to 'exercises')
-rw-r--r--exercises/074_comptime9.zig5
1 files changed, 3 insertions, 2 deletions
diff --git a/exercises/074_comptime9.zig b/exercises/074_comptime9.zig
index 50894fd..1fc8e31 100644
--- a/exercises/074_comptime9.zig
+++ b/exercises/074_comptime9.zig
@@ -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) {