]> git.lizzy.rs Git - rust.git/blobdiff - src/librbml/io.rs
Fallout from stabilization.
[rust.git] / src / librbml / io.rs
index f39860c8695c96c8c629513fe4138b19f219e656..9c746c69baafcf1f72eafc6df0b5eca5c3a24636 100644 (file)
@@ -103,7 +103,7 @@ fn write(&mut self, buf: &[u8]) -> IoResult<()> {
 
             // Do the necessary writes
             if left.len() > 0 {
-                slice::bytes::copy_memory(self.buf.slice_from_mut(self.pos), left);
+                slice::bytes::copy_memory(&mut self.buf[self.pos..], left);
             }
             if right.len() > 0 {
                 self.buf.push_all(right);