mirror of
https://codeberg.org/ziglings/exercises.git
synced 2025-01-14 10:46:30 +00:00
11 lines
384 B
Diff
11 lines
384 B
Diff
--- exercises/028_defer2.zig 2023-10-03 22:15:22.122241138 +0200
|
|
+++ answers/028_defer2.zig 2023-10-05 20:04:06.966098530 +0200
|
|
@@ -18,7 +18,7 @@
|
|
fn printAnimal(animal: u8) void {
|
|
std.debug.print("(", .{});
|
|
|
|
- std.debug.print(") ", .{}); // <---- how?!
|
|
+ defer std.debug.print(") ", .{}); // <---- how?!
|
|
|
|
if (animal == 'g') {
|
|
std.debug.print("Goat", .{});
|