Continuing the discussion from How to "memcpy" bytes in stable rust:
fn byte_copy(from: &[u8], mut to: &mut [u8]) -> usize {
^~~
to.write(&from).unwrap()
}
Why do we need this mut
? In my understanding I'd need it to do this
to = &mut foo;
But it's not like a method on &mut self
could make to
point somewhere else.