Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/flow_control/match/binding.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ fn main() {
match some_number() {
// Got `Some` variant, match if its value, bound to `n`,
// is equal to 42.
// Could also use `Some(42)` and print `"The Awnser: 42!"`
// Could also use `Some(42)` and print `"The Answer: 42!"`
// but that would require changing `42` in 2 spots should
// you ever wish to change it.
// Could also use `Some(n) if n == 42` and print `"The Awnser: {n}!"`
// Could also use `Some(n) if n == 42` and print `"The Answer: {n}!"`
// but that would not contribute to exhaustiveness checks.
// (Although in this case that would not matter since
// the next arm is a "catch-all" pattern)
Expand Down