SHARE
TWEET

Untitled

a guest Oct 15th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn publish(book: &Vec<String>) {
  2.     println!("{:?}", book);
  3. }
  4.  
  5. fn main() {
  6.     let mut book = Vec::new();
  7.     book.push("hello".into());
  8.     book.push("world".into());
  9.     {
  10.         let p = &mut book;
  11.         println!("{}", book.len());
  12.         //book.push("!".into());
  13.         //p.push("!".into());
  14.         publish(p)
  15.     }
  16.     //book.push("goodbye".into());
  17.     //publish(&book);
  18. }
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