SHARE
TWEET

Untitled

a guest Jul 17th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn main() {
  2.     let deep_wrapped: Option<Option<Option<String>>> = Some(Some(Some("hello".to_string())));
  3.    
  4.     let unwrapped1 = deep_wrapped.expect("None in depth 1!");
  5.     let unwrapped2 = unwrapped1.expect("None in depth 2!");
  6.     let unwrapped3 = unwrapped2.expect("None in depth 3!");
  7.    
  8.     println!("{}", unwrapped3);
  9. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top