]> git.lizzy.rs Git - rust.git/blobdiff - src/libcore/fmt/float.rs
Fallout from stabilization.
[rust.git] / src / libcore / fmt / float.rs
index f1b9ebe6d905d13e6271094fe4bd61126aaff854..245dc00d838244cf7746107a3e7773eef1aa2cfc 100644 (file)
@@ -179,7 +179,7 @@ pub fn float_to_str_bytes_common<T: Float, U, F>(
         _ => ()
     }
 
-    buf.slice_to_mut(end).reverse();
+    buf[..end].reverse();
 
     // Remember start of the fractional digits.
     // Points one beyond end of buf if none get generated,
@@ -316,7 +316,7 @@ struct Filler<'a> {
 
             impl<'a> fmt::Writer for Filler<'a> {
                 fn write_str(&mut self, s: &str) -> fmt::Result {
-                    slice::bytes::copy_memory(self.buf.slice_from_mut(*self.end),
+                    slice::bytes::copy_memory(&mut self.buf[(*self.end)..],
                                               s.as_bytes());
                     *self.end += s.len();
                     Ok(())