Skip to content

Instantly share code, notes, and snippets.

@rust-play
Created July 17, 2020 03:37
Show Gist options
  • Save rust-play/edd6f6989559852fb72ca5329c58a5e8 to your computer and use it in GitHub Desktop.
Save rust-play/edd6f6989559852fb72ca5329c58a5e8 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
fn t() -> Result<bool, ()> {
Ok(
Ok(true)? && Ok(true)?
)
}
fn main(){
match t() {
Ok(true) => println!("ok"),
_ => println!("err"),
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment