From cfafc1b7377d34d8c60db7cd386836d39b80af41 Mon Sep 17 00:00:00 2001 From: Aaron Turon Date: Sun, 2 Nov 2014 17:04:32 -0800 Subject: Prelude: rename and consolidate extension traits This commit renames a number of extension traits for slices and string slices, now that they have been refactored for DST. In many cases, multiple extension traits could now be consolidated. Further consolidation will be possible with generalized where clauses. The renamings are consistent with the [new `-Prelude` suffix](https://github.com/rust-lang/rfcs/pull/344). There are probably a few more candidates for being renamed this way, but that is left for API stabilization of the relevant modules. Because this renames traits, it is a: [breaking-change] However, I do not expect any code that currently uses the standard library to actually break. Closes #17917 --- src/libstd/io/extensions.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstd/io/extensions.rs') diff --git a/src/libstd/io/extensions.rs b/src/libstd/io/extensions.rs index 6d0b8ebc3d9..07aa25bc044 100644 --- a/src/libstd/io/extensions.rs +++ b/src/libstd/io/extensions.rs @@ -22,7 +22,7 @@ use num::Int; use option::{Option, Some, None}; use ptr::RawPtr; use result::{Ok, Err}; -use slice::{ImmutableSlice, AsSlice}; +use slice::{SlicePrelude, AsSlice}; /// An iterator that reads a single byte on each iteration, /// until `.read_byte()` returns `EndOfFile`. @@ -150,7 +150,7 @@ pub fn u64_to_be_bytes(n: u64, size: uint, f: |v: &[u8]| -> T) -> T { /// 32-bit value is parsed. pub fn u64_from_be_bytes(data: &[u8], start: uint, size: uint) -> u64 { use ptr::{copy_nonoverlapping_memory}; - use slice::MutableSlice; + use slice::SlicePrelude; assert!(size <= 8u); -- cgit 1.4.1-3-g733a5