From e91d810b9b36d6bb163970cd0e8bbf4692f704bb Mon Sep 17 00:00:00 2001 From: Aaron Turon Date: Sun, 2 Nov 2014 20:27:46 -0800 Subject: Libs: Unify concat and concat_vec We've long had traits `StrVector` and `VectorVector` providing `concat`/`connect` and `concat_vec`/`connect_vec` respectively. The reason for the distinction is that coherence rules did not used to be robust enough to allow impls on e.g. `Vec` versus `Vec<&[T]>`. This commit consolidates the traits into a single `SliceConcatExt` trait provided by `slice` and the preldue (where it replaces `StrVector`, which is removed.) [breaking-change] --- src/libstd/path/posix.rs | 4 ++-- src/libstd/path/windows.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libstd/path') diff --git a/src/libstd/path/posix.rs b/src/libstd/path/posix.rs index 60f147eac9b..41cbaa2b807 100644 --- a/src/libstd/path/posix.rs +++ b/src/libstd/path/posix.rs @@ -22,7 +22,7 @@ use option::Option::{None, Some}; use kinds::Sized; use str::{FromStr, Str}; use str; -use slice::{CloneSliceExt, Splits, AsSlice, VectorVector, +use slice::{CloneSliceExt, Split, AsSlice, SliceConcatExt, PartialEqSliceExt, SliceExt}; use vec::Vec; @@ -306,7 +306,7 @@ impl GenericPath for Path { } } } - Some(Path::new(comps.connect_vec(&SEP_BYTE))) + Some(Path::new(comps.as_slice().connect(&SEP_BYTE))) } } diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index 879a96e8026..165d2c32416 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -25,8 +25,8 @@ use iter::{Iterator, IteratorExt, Map, repeat}; use mem; use option::Option; use option::Option::{Some, None}; -use slice::SliceExt; -use str::{SplitTerminator, FromStr, StrVector, StrExt}; +use slice::{AsSlice, SliceExt, SliceConcatExt}; +use str::{CharSplits, FromStr, Str, StrAllocating, StrPrelude}; use string::{String, ToString}; use unicode::char::UnicodeChar; use vec::Vec; -- cgit 1.4.1-3-g733a5