Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main() {
- let slice = &mut [1, 2, 3];
- // Write data into slice
- slice[1] = 99;
- assert_eq!(slice[0], 1);
- assert_eq!(slice[1], 99);
- assert_eq!(slice[2], 3);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement