about summary refs log tree commit diff
path: root/src/libstd/path/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/path/mod.rs')
-rw-r--r--src/libstd/path/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/path/mod.rs b/src/libstd/path/mod.rs
index d84848545bd..16552daae36 100644
--- a/src/libstd/path/mod.rs
+++ b/src/libstd/path/mod.rs
@@ -76,7 +76,7 @@ use option::{Option, None, Some};
 use str;
 use str::{MaybeOwned, Str, StrSlice};
 use string::String;
-use slice::Slice;
+use slice::{Slice, CloneableVector};
 use slice::{ImmutablePartialEqSlice, ImmutableSlice};
 use vec::Vec;
 
@@ -480,7 +480,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe {
             let extlen = extension.container_as_bytes().len();
             match (name.rposition_elem(&dot), extlen) {
                 (None, 0) | (Some(0), 0) => None,
-                (Some(idx), 0) => Some(Vec::from_slice(name.slice_to(idx))),
+                (Some(idx), 0) => Some(name.slice_to(idx).to_vec()),
                 (idx, extlen) => {
                     let idx = match idx {
                         None | Some(0) => name.len(),
@@ -798,7 +798,7 @@ pub trait BytesContainer {
     /// Consumes the receiver and converts it into Vec<u8>
     #[inline]
     fn container_into_owned_bytes(self) -> Vec<u8> {
-        Vec::from_slice(self.container_as_bytes())
+        self.container_as_bytes().to_vec()
     }
     /// Returns the receiver interpreted as a utf-8 string, if possible
     #[inline]