Skip to content

Instantly share code, notes, and snippets.

Created November 2, 2015 05:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/082054907dbcf5cc0b60 to your computer and use it in GitHub Desktop.
Save anonymous/082054907dbcf5cc0b60 to your computer and use it in GitHub Desktop.
Shared via Rust Playground
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