1
0
Fork 0
mirror of https://codeberg.org/ziglings/exercises.git synced 2025-06-08 01:57:02 +09:00

move enum comment to earlier occurrence

This commit is contained in:
Josh Jones 2024-05-07 23:46:48 +02:00
parent dfdaf03d99
commit 1fe334da31
2 changed files with 2 additions and 1 deletions

View file

@ -40,6 +40,8 @@ pub fn main() void {
} else |err| switch (err) {
MyNumberError.TooBig => std.debug.print(">4. ", .{}),
// Please add a match for TooSmall here and have it print: "<4. "
// No "else" needed! Why is that?
}
}

View file

@ -45,7 +45,6 @@ pub fn main() void {
Ops.pow => {
current_value *= current_value;
},
// No "else" needed! Why is that?
}
std.debug.print("{} ", .{current_value});