Skip to content

Instantly share code, notes, and snippets.

@jagajaga
Created September 23, 2014 14:27
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 jagajaga/ec92220b9bb88fcb4616 to your computer and use it in GitHub Desktop.
Save jagajaga/ec92220b9bb88fcb4616 to your computer and use it in GitHub Desktop.
fn returnSS() -> String {
String::from_str("lala")
}
fn returnS() -> &'static str {
returnSS().as_slice()
}
fn main() {
let result = returnS();
println!("{}", result);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment