mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-10 17:09:59 +00:00
Must use capture value
This commit is contained in:
@@ -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. "
|
||||||
|
|||||||
Reference in New Issue
Block a user