about summary refs log tree commit diff
path: root/src/libcore/fmt/float.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-10-02 03:07:17 +0000
committerbors <bors@rust-lang.org>2014-10-02 03:07:17 +0000
commit07b2c1be9dad53272575844efedfb7314fc4fb84 (patch)
treed26dab000c4444cf6e972bb30da0392e675ca52b /src/libcore/fmt/float.rs
parentd53874eccf0657d5d9c0a9ed9f84380d27d1c423 (diff)
parent6e0611a48707a1f5d90aee32a02b2b15957ef25b (diff)
downloadrust-07b2c1be9dad53272575844efedfb7314fc4fb84.tar.gz
rust-07b2c1be9dad53272575844efedfb7314fc4fb84.zip
auto merge of #17620 : nick29581/rust/slice4, r=aturon
cc @aturon 

r? anyone?
Diffstat (limited to 'src/libcore/fmt/float.rs')
-rw-r--r--src/libcore/fmt/float.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/fmt/float.rs b/src/libcore/fmt/float.rs
index 92ef0c281f2..343ab7cfd28 100644
--- a/src/libcore/fmt/float.rs
+++ b/src/libcore/fmt/float.rs
@@ -17,7 +17,7 @@ use iter::{range, DoubleEndedIterator};
 use num::{Float, FPNaN, FPInfinite, ToPrimitive, Primitive};
 use num::{Zero, One, cast};
 use result::Ok;
-use slice::{ImmutableSlice, MutableSlice};
+use slice::MutableSlice;
 use slice;
 use str::StrSlice;
 
@@ -173,7 +173,7 @@ pub fn float_to_str_bytes_common<T: Primitive + Float, U>(
         _ => ()
     }
 
-    buf.slice_to_mut(end).reverse();
+    buf[mut ..end].reverse();
 
     // Remember start of the fractional digits.
     // Points one beyond end of buf if none get generated,
@@ -310,7 +310,7 @@ pub fn float_to_str_bytes_common<T: Primitive + Float, U>(
 
             impl<'a> fmt::FormatWriter for Filler<'a> {
                 fn write(&mut self, bytes: &[u8]) -> fmt::Result {
-                    slice::bytes::copy_memory(self.buf.slice_from_mut(*self.end),
+                    slice::bytes::copy_memory(self.buf[mut *self.end..],
                                               bytes);
                     *self.end += bytes.len();
                     Ok(())
@@ -328,5 +328,5 @@ pub fn float_to_str_bytes_common<T: Primitive + Float, U>(
         }
     }
 
-    f(buf.slice_to(end))
+    f(buf[..end])
 }