Skip to content

Instantly share code, notes, and snippets.

@itn3000
Created May 31, 2017 02:59
Show Gist options
  • Select an option

  • Save itn3000/5de0ea419e7476dd975f2069799ede20 to your computer and use it in GitHub Desktop.

Select an option

Save itn3000/5de0ea419e7476dd975f2069799ede20 to your computer and use it in GitHub Desktop.
copy slice test(compilation failed on stable but successed on nightly)
fn main() {
let mut x = [0u8;16];
x[0..3].copy_from_slice(&x[4..8])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment