Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  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 = &book;
  11. book.push("!".into());
  12. p.push("!".into());
  13. }
  14. publish(book);
  15. // publish(book);
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement