Flow control match binding in RBE

This commit is contained in:
2023-09-29 16:52:18 -04:00
parent ca812add16
commit 6e50ec65f8
2 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
fn some_number() -> Option<u32> {
Some(42)
}
fn main() {
match some_number() {
Some(n @ 42) => println!("The Answer: {}!", n),
Some(n) => println!("Not interesting... {}", n),
_ => (),
}
}