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<String>` 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]
This commit is contained in:
parent
4f863a338e
commit
e91d810b9b
5 changed files with 34 additions and 58 deletions
|
@ -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)))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue