mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-11 21:29:18 +00:00
11 lines
260 B
Rust
11 lines
260 B
Rust
// variables4.rs
|
|
// Make me compile! Execute the command `rustlings hint variables4` if you want a hint :)
|
|
|
|
fn main() {
|
|
let x: Option<i32> = Some(5);
|
|
match x {
|
|
Some(x) => println!("Number {}", x),
|
|
None => println!("kein wert"),
|
|
}
|
|
}
|