diff options
| author | Aaron Turon <aturon@mozilla.com> | 2014-10-02 11:48:07 -0700 |
|---|---|---|
| committer | Aaron Turon <aturon@mozilla.com> | 2014-10-02 11:48:07 -0700 |
| commit | d2ea0315e09cbd495a67c9e3d5053b57e2b5a8b7 (patch) | |
| tree | d39de6be5866c0f0f37f9f3219b8217c873d8b52 /src/libcore/fmt/float.rs | |
| parent | c0c6c895890770d7029324fd9b592f42e0564e8b (diff) | |
| download | rust-d2ea0315e09cbd495a67c9e3d5053b57e2b5a8b7.tar.gz rust-d2ea0315e09cbd495a67c9e3d5053b57e2b5a8b7.zip | |
Revert "Use slice syntax instead of slice_to, etc."
This reverts commit 40b9f5ded50ac4ce8c9323921ec556ad611af6b7.
Diffstat (limited to 'src/libcore/fmt/float.rs')
| -rw-r--r-- | src/libcore/fmt/float.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/fmt/float.rs b/src/libcore/fmt/float.rs index 343ab7cfd28..92ef0c281f2 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::MutableSlice; +use slice::{ImmutableSlice, MutableSlice}; use slice; use str::StrSlice; @@ -173,7 +173,7 @@ pub fn float_to_str_bytes_common<T: Primitive + Float, U>( _ => () } - 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, @@ -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[mut *self.end..], + slice::bytes::copy_memory(self.buf.slice_from_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[..end]) + f(buf.slice_to(end)) } |
