Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main() {
- let mut vec = vec![1, 2, 3];
- // Modify vec in-place!
- for item in vec.iter_mut() {
- *item = (*item) * (*item);
- }
- // Print out the data of vec in console
- println!("{:?}", vec);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement