Created
January 17, 2019 03:05
-
-
Save rust-play/2d9b43b5e751569361527479eb55a66b to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
This file contains 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 main() { | |
let s = "foo"; | |
let res = match s { | |
"foo" => "foo", | |
"bar" => "bar", | |
_ => "other", | |
}; | |
println!("res: {}", res); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment