about summary refs log tree commit diff
path: root/src/libcore/fmt
diff options
context:
space:
mode:
authorNick Cameron <ncameron@mozilla.com>2014-12-19 12:44:24 +1300
committerNick Cameron <ncameron@mozilla.com>2014-12-30 13:06:25 +1300
commit3bf405682df4dfb55b969640b811b317fa55447d (patch)
tree084a0731238ebc8a79606e163fb82e15d2ed096e /src/libcore/fmt
parent4e2afb0052618ca3d758fffd0cf50559be774391 (diff)
downloadrust-3bf405682df4dfb55b969640b811b317fa55447d.tar.gz
rust-3bf405682df4dfb55b969640b811b317fa55447d.zip
Fallout from mut slices
Diffstat (limited to 'src/libcore/fmt')
-rw-r--r--src/libcore/fmt/float.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/fmt/float.rs b/src/libcore/fmt/float.rs
index 47701ab8ffd..329fe7c7b49 100644
--- a/src/libcore/fmt/float.rs
+++ b/src/libcore/fmt/float.rs
@@ -179,7 +179,7 @@ pub fn float_to_str_bytes_common<T: Float, U, F>(
         _ => ()
     }
 
-    buf[mut ..end].reverse();
+    buf.slice_to_mut(end).reverse();
 
     // Remember start of the fractional digits.
     // Points one beyond end of buf if none get generated,
@@ -316,7 +316,7 @@ pub fn float_to_str_bytes_common<T: Float, U, F>(
 
             impl<'a> fmt::FormatWriter for Filler<'a> {
                 fn write(&mut self, bytes: &[u8]) -> fmt::Result {
-                    slice::bytes::copy_memory(self.buf[mut *self.end..],
+                    slice::bytes::copy_memory(self.buf.slice_from_mut(*self.end),
                                               bytes);
                     *self.end += bytes.len();
                     Ok(())