-
-
Save carols10cents/1698dc9940c301207767e4cb87bcc848 to your computer and use it in GitHub Desktop.
Shared via Rust Playground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let mut a_vec = vec![1, 2, 3]; | |
let mut a_slice = &mut a_vec[..]; | |
let ref mut an_item = a_slice[0]; | |
let mut foo = &mut an_item; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment