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/path/mod.rs | 6 +++--- src/libstd/path/posix.rs | 6 +++--- src/libstd/path/windows.rs | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/libstd/path') diff --git a/src/libstd/path/mod.rs b/src/libstd/path/mod.rs index 8949a881c9d..e55933c4262 100644 --- a/src/libstd/path/mod.rs +++ b/src/libstd/path/mod.rs @@ -74,10 +74,10 @@ use fmt; use iter::Iterator; use option::{Option, None, Some}; use str; -use str::{MaybeOwned, Str, StrSlice}; +use str::{MaybeOwned, Str, StrPrelude}; use string::String; -use slice::{AsSlice, CloneableVector}; -use slice::{ImmutablePartialEqSlice, ImmutableSlice}; +use slice::{AsSlice, CloneSliceAllocPrelude}; +use slice::{PartialEqSlicePrelude, SlicePrelude}; use vec::Vec; /// Typedef for POSIX file paths. diff --git a/src/libstd/path/posix.rs b/src/libstd/path/posix.rs index 60cfa7a13de..a927e091840 100644 --- a/src/libstd/path/posix.rs +++ b/src/libstd/path/posix.rs @@ -20,8 +20,8 @@ use iter::{DoubleEndedIterator, AdditiveIterator, Extendable, Iterator, Map}; use option::{Option, None, Some}; use str::Str; use str; -use slice::{CloneableVector, Splits, AsSlice, VectorVector, - ImmutablePartialEqSlice, ImmutableSlice}; +use slice::{CloneSliceAllocPrelude, Splits, AsSlice, VectorVector, + PartialEqSlicePrelude, SlicePrelude}; use vec::Vec; use super::{BytesContainer, GenericPath, GenericPathUnsafe}; @@ -444,7 +444,7 @@ mod tests { use super::*; use mem; use str; - use str::StrSlice; + use str::StrPrelude; macro_rules! t( (s: $path:expr, $exp:expr) => ( diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index 3ef142a2e82..c5f84244928 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -22,8 +22,8 @@ use io::Writer; use iter::{AdditiveIterator, DoubleEndedIterator, Extendable, Iterator, Map}; use mem; use option::{Option, Some, None}; -use slice::{AsSlice, ImmutableSlice}; -use str::{CharSplits, Str, StrAllocating, StrVector, StrSlice}; +use slice::{AsSlice, SlicePrelude}; +use str::{CharSplits, Str, StrAllocating, StrVector, StrPrelude}; use string::String; use unicode::char::UnicodeChar; use vec::Vec; -- cgit 1.4.1-3-g733a5