about summary refs log tree commit diff
path: root/src/libstd/path/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-10-07 06:17:11 +0000
committerbors <bors@rust-lang.org>2014-10-07 06:17:11 +0000
commite62ef37cfae680e60584731635a89e955121a5bb (patch)
tree768fd0552e75e5380b1122ac56448f0465df8fb3 /src/libstd/path/mod.rs
parent8d702167ba6af50c64683685bae4956cb094a23a (diff)
parenteb2fdc8b065218476744ed428097c859616c62f0 (diff)
downloadrust-e62ef37cfae680e60584731635a89e955121a5bb.tar.gz
rust-e62ef37cfae680e60584731635a89e955121a5bb.zip
auto merge of #17807 : nick29581/rust/slice6, r=aturon
r? @aturon
Diffstat (limited to 'src/libstd/path/mod.rs')
-rw-r--r--src/libstd/path/mod.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/path/mod.rs b/src/libstd/path/mod.rs
index 16552daae36..6a122990246 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, CloneableVector};
+use slice::{AsSlice, CloneableVector};
 use slice::{ImmutablePartialEqSlice, ImmutableSlice};
 use vec::Vec;
 
@@ -357,7 +357,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe {
                 match name.rposition_elem(&dot) {
                     None | Some(0) => name,
                     Some(1) if name == b".." => name,
-                    Some(pos) => name.slice_to(pos)
+                    Some(pos) => name[..pos]
                 }
             })
         }
@@ -404,7 +404,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe {
                 match name.rposition_elem(&dot) {
                     None | Some(0) => None,
                     Some(1) if name == b".." => None,
-                    Some(pos) => Some(name.slice_from(pos+1))
+                    Some(pos) => Some(name[pos+1..])
                 }
             }
         }
@@ -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(name.slice_to(idx).to_vec()),
+                (Some(idx), 0) => Some(name[..idx].to_vec()),
                 (idx, extlen) => {
                     let idx = match idx {
                         None | Some(0) => name.len(),
@@ -489,7 +489,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe {
 
                     let mut v;
                     v = Vec::with_capacity(idx + extlen + 1);
-                    v.push_all(name.slice_to(idx));
+                    v.push_all(name[..idx]);
                     v.push(dot);
                     v.push_all(extension.container_as_bytes());
                     Some(v)