mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-13 09:05:00 +00:00
27 lines
472 B
Rust
27 lines
472 B
Rust
|
// rustfmt-indent_match_arms: false
|
||
|
|
||
|
fn main() {
|
||
|
match x {
|
||
|
1 => "one",
|
||
|
2 => "two",
|
||
|
3 => "three",
|
||
|
4 => "four",
|
||
|
5 => "five",
|
||
|
_ => "something else",
|
||
|
}
|
||
|
|
||
|
match x {
|
||
|
1 => "one",
|
||
|
2 => "two",
|
||
|
3 => "three",
|
||
|
4 => "four",
|
||
|
5 => match y {
|
||
|
'a' => 'A',
|
||
|
'b' => 'B',
|
||
|
'c' => 'C',
|
||
|
_ => "Nope",
|
||
|
},
|
||
|
_ => "something else",
|
||
|
}
|
||
|
}
|