Skip to content

Instantly share code, notes, and snippets.

@BrantRoom3327
Last active June 20, 2018 19:33
Show Gist options
  • Save BrantRoom3327/c614a4e4706eeaa2fb62f484cb0a2434 to your computer and use it in GitHub Desktop.
Save BrantRoom3327/c614a4e4706eeaa2fb62f484cb0a2434 to your computer and use it in GitHub Desktop.
assert_eq!(Some("Andre").unwrap_or("Giant"), "Andre"); // "Andre"
assert_eq!(None.unwrap_or("Vizzini"), "Vizzini"); // "Vizzini"
//from above
assert_eq!(waiting.unwrap_or("Nope"), "I'm Waiting for Vizzini."); // I'm Waiting for Vizzini.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment