about summary refs log tree commit diff
path: root/src/libstd/path/posix.rs
diff options
context:
space:
mode:
authorAaron Turon <aturon@mozilla.com>2014-11-02 20:27:46 -0800
committerAaron Turon <aturon@mozilla.com>2014-12-30 12:02:22 -0800
commite91d810b9b36d6bb163970cd0e8bbf4692f704bb (patch)
tree5f8fb0a352ad9b0c23c36e25c789ec4c46f6bd41 /src/libstd/path/posix.rs
parent4f863a338e0a7c33f81a8ac138103f1a0e8b33c5 (diff)
downloadrust-e91d810b9b36d6bb163970cd0e8bbf4692f704bb.tar.gz
rust-e91d810b9b36d6bb163970cd0e8bbf4692f704bb.zip
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]
Diffstat (limited to 'src/libstd/path/posix.rs')
-rw-r--r--src/libstd/path/posix.rs4
1 files changed, 2 insertions, 2 deletions
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)))
         }
     }