Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #[derive(Debug)]
- struct I(u64);
- fn main() {
- let mut v = vec![I(1),I(2),I(3)];
- for &mut I(ref mut i) in &mut v {
- *i = *i * *i;
- }
- println!("{:?}", &v[2]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement