12 lines
226 B
Rust
12 lines
226 B
Rust
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),
|
|
_ => (),
|
|
}
|
|
}
|