mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-05-05 04:58:03 +08:00
12 lines
194 B
Rust
Executable File
12 lines
194 B
Rust
Executable File
fn main() {
|
|
// ANCHOR: here
|
|
let s = Some(String::from("Hello!"));
|
|
|
|
if let Some(_) = s {
|
|
println!("found a string");
|
|
}
|
|
|
|
println!("{:?}", s);
|
|
// ANCHOR_END: here
|
|
}
|