Skip to content

Commit

Permalink
Merge pull request #95 from KorryKatti/patch-2
Browse files Browse the repository at this point in the history
Fix: Add else branch to make the switch exhaustive
  • Loading branch information
pedropark99 authored Nov 24, 2024
2 parents 7229576 + 426b59b commit e9afae4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Chapters/03-structs.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,11 @@ xsw: switch (@as(u8, 1)) {
2 => continue :xsw 3,
3 => return,
4 => {},
else => {
try stdout.print(
"Unmatched case, value: {d}\n", .{@as(u8, 1)}
);
},
}
```

Expand Down

0 comments on commit e9afae4

Please # to comment.