mirror of
				https://codeberg.org/ziglings/exercises.git
				synced 2025-11-04 04:35:38 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			384 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			12 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", .{});
 |