mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
14 lines
344 B
Rust
14 lines
344 B
Rust
fn main() {
|
|
fn f() -> Option<i32> {
|
|
Some("fffffffsssssssssddddssssfffffddddff")
|
|
.map(|s| s)
|
|
.map(|s| s.to_string())
|
|
.map(|res| match Some(res) {
|
|
Some(ref s) if s == "" => 41,
|
|
Some(_) => 42,
|
|
_ => 43,
|
|
})
|
|
}
|
|
println!("{:?}", f())
|
|
}
|