]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/rt/util.rs
Fallout from stabilization.
[rust.git] / src / libstd / rt / util.rs
index 235cedcda524442959179eb13ace211a741b4b06..4023a0a4c100b3b86f5ee319bf857920048f248f 100644 (file)
@@ -130,7 +130,7 @@ struct BufWriter<'a> {
     }
     impl<'a> fmt::Writer for BufWriter<'a> {
         fn write_str(&mut self, bytes: &str) -> fmt::Result {
-            let left = self.buf.slice_from_mut(self.pos);
+            let left = &mut self.buf[self.pos..];
             let to_write = &bytes.as_bytes()[..cmp::min(bytes.len(), left.len())];
             slice::bytes::copy_memory(left, to_write);
             self.pos += to_write.len();