-
-
Save chamakits/33b8f23f138b238b11ed to your computer and use it in GitHub Desktop.
Shared via 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 = "abc".to_string(); | |
{ | |
//println!("{}", s); | |
//sfun(s); | |
} | |
match s { | |
_ => {println!("{}", s)} | |
} | |
sfun(s); | |
sfun(s); | |
} | |
fn sfun(s: String) { | |
println!("{}", s); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment