Created
June 20, 2016 11:39
-
-
Save anonymous/ba981499c41674dfeb41221206de11c2 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
// for frank | |
fn main() { | |
let bar = [1,2,3]; | |
let mut foo: [u8; 2] = [0, 0]; | |
foo.clone_from_slice(&bar[0..2]); | |
println!("{:?}", foo); | |
println!("{:?}", bar); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment