Option<T> with tuple

Hi! How to get values from Option<(&K, &V)> ?

if let Some((k, v)) = opt {
    println!("{:?}: {:?}", k, v);
}
3 Likes

alternatively, use.unwrap() to panic or ? to propagate the NoneError to the caller.
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2015&gist=457b2fd639dacaafdda08a7247b4eb9a