SHARE
TWEET

Untitled

a guest Oct 22nd, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn main() {
  2.     let s1 = String::from("hello");
  3.     let s2 = id(&mut s1);
  4.    
  5.     println!("{}, {}", s1, s2);
  6. }
  7.  
  8. fn id(s: &mut String) -> &String {
  9.     s
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top