Skip to content

Instantly share code, notes, and snippets.

@magnet
Created October 7, 2018 14:02
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/ae6302f3a21cadafeb47f86420611ddd to your computer and use it in GitHub Desktop.
Save magnet/ae6302f3a21cadafeb47f86420611ddd to your computer and use it in GitHub Desktop.
fn main() {
let s = "Foo";
let s = foo(s);
println!("{}", s);
}
fn foo(s: &str) -> &str {
let s2 = "Bar";
println!("{}", s2);
s
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment