trpl-zh-cn/listings/ch19-patterns-and-matching/listing-19-09/src/main.rs
2024-10-20 23:44:05 +08:00

9 lines
177 B
Rust

fn main() {
let some_option_value: Option<i32> = None;
// ANCHOR: here
if let Some(x) = some_option_value {
println!("{x}");
}
// ANCHOR_END: here
}