exercises/patches/patches/028_defer2.patch

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", .{});