Warning
This post was published 58 days ago. The information described in this article may have changed.
Why I can not write a code like this:
fn main() {
let a = None;
let b = Some(1);
if let Some(c) = a | b {
dbg!(c);
}
}
I want to match the first one of a and b that can match successfully.
I think this is a natural idea for newbie.
8 posts - 4 participants
🏷️ rust_feed