-
-
Save Dustin4444/89bec79d99b714ccf0d5b7849bc02753 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
| #![crate_type = "cdylib"] | |
| #![allow(unused)] | |
| fn main() { | |
| let x: Result<i32, &str> = Ok(-3); | |
| assert_eq!(x.is_ok(), true); | |
| let x: Result<i32, &str> = Err("Some error message"); | |
| assert_eq!(x.is_ok(), false); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment