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