langref: Fix example typo

This commit is contained in:
Alex 2024-04-05 14:01:17 +01:00 committed by Veikka Tuominen
parent 23f729aec9
commit b22ef55f36

View File

@ -5577,7 +5577,7 @@ fn doAThing(str: []u8) void {
errors in the {#syntax#}else{#endsyntax#} case, which now contains a narrower error set: errors in the {#syntax#}else{#endsyntax#} case, which now contains a narrower error set:
</p> </p>
{#syntax_block|zig|handle_some_error_scenarios.zig#} {#syntax_block|zig|handle_some_error_scenarios.zig#}
fn doAnotherThing(str: []u8) error{InvaidChar}!void { fn doAnotherThing(str: []u8) error{InvalidChar}!void {
if (parseU64(str, 10)) |number| { if (parseU64(str, 10)) |number| {
doSomethingWithNumber(number); doSomethingWithNumber(number);
} else |err| switch (err) { } else |err| switch (err) {