Browse Source

Must use capture value

Dave Gauer 4 years ago
parent
commit
a84677d798
1 changed files with 1 additions and 1 deletions
  1. 1 1
      exercises/033_iferror.zig

+ 1 - 1
exercises/033_iferror.zig

@@ -30,7 +30,7 @@ pub fn main() void {
 
 
         var n = numberMaybeFail(num);
         var n = numberMaybeFail(num);
         if (n) |value| {
         if (n) |value| {
-            std.debug.print("=4. ", .{});
+            std.debug.print("={}. ", .{value});
         } else |err| switch (err) {
         } else |err| switch (err) {
             MyNumberError.TooBig => std.debug.print(">4. ", .{}),
             MyNumberError.TooBig => std.debug.print(">4. ", .{}),
             // Please add a match for TooSmall here and have it print: "<4. "
             // Please add a match for TooSmall here and have it print: "<4. "