Skip to content

Instantly share code, notes, and snippets.

@chamakits
Forked from anonymous/playground.rs
Created November 2, 2015 05:51
Show Gist options
  • Save chamakits/33b8f23f138b238b11ed to your computer and use it in GitHub Desktop.
Save chamakits/33b8f23f138b238b11ed 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