-
-
Save ZhangHanDong/bde973a40eb2c26de2fab35c2faa7f96 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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