trpl-zh-cn/listings/ch06-enums-and-pattern-matching/no-listing-06-option-examples/src/main.rs

9 lines
164 B
Rust
Raw Normal View History

2022-02-06 16:43:51 +08:00
fn main() {
// ANCHOR: here
let some_number = Some(5);
2022-08-19 19:17:25 +08:00
let some_char = Some('e');
2022-02-06 16:43:51 +08:00
let absent_number: Option<i32> = None;
// ANCHOR_END: here
}