Skip to content

Instantly share code, notes, and snippets.

@magnet
Created October 6, 2018 20:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magnet/c58ed34d41b1935e29441b497c81dcfb to your computer and use it in GitHub Desktop.
Save magnet/c58ed34d41b1935e29441b497c81dcfb to your computer and use it in GitHub Desktop.
fn main() {
let s = "Foo".to_string();
let s = foo(s);
println!("{}", s);
}
fn foo(_s: String) -> String {
let s2 = "Bar".to_string();
println!("{}", s2);
s2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment