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.