021_errors.patch 584 B

1234567891011121314151617181920
  1. --- exercises/021_errors.zig 2023-10-03 22:15:22.122241138 +0200
  2. +++ answers/021_errors.zig 2023-10-05 20:04:06.936097967 +0200
  3. @@ -9,7 +9,7 @@
  4. // "TooSmall". Please add it where needed!
  5. const MyNumberError = error{
  6. TooBig,
  7. - ???,
  8. + TooSmall,
  9. TooFour,
  10. };
  11. @@ -26,7 +26,7 @@
  12. if (number_error == MyNumberError.TooBig) {
  13. std.debug.print(">4. ", .{});
  14. }
  15. - if (???) {
  16. + if (number_error == MyNumberError.TooSmall) {
  17. std.debug.print("<4. ", .{});
  18. }
  19. if (number_error == MyNumberError.TooFour) {