Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn publish(book: Vec<String>) {
- println!("{:?}", book);
- }
- fn main() {
- let mut book = Vec::new();
- book.push("hello".into());
- book.push("world".into());
- {
- let p = &book;
- book.push("!".into());
- p.push("!".into());
- }
- publish(book);
- // publish(book);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement