diff options
| author | bors <bors@rust-lang.org> | 2015-01-29 05:47:21 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-01-29 05:47:21 +0000 |
| commit | bedd8108dc9b79402d1ea5349d766275f73398ff (patch) | |
| tree | 33580f180481d78ead16c7a8d3af4513968f4007 /src/libstd/path | |
| parent | c5961ad06d45689b44ff305c15d6ec7ec65755a9 (diff) | |
| parent | bce81e24647507c82e02e9918f54e8e3a2431149 (diff) | |
| download | rust-bedd8108dc9b79402d1ea5349d766275f73398ff.tar.gz rust-bedd8108dc9b79402d1ea5349d766275f73398ff.zip | |
Auto merge of #21680 - japaric:slice, r=alexcrichton
Replaces `slice_*` method calls with slicing syntax, and removes `as_slice()` calls that are redundant due to `Deref`.
Diffstat (limited to 'src/libstd/path')
| -rw-r--r-- | src/libstd/path/posix.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/path/posix.rs b/src/libstd/path/posix.rs index 39138e14803..588f724134e 100644 --- a/src/libstd/path/posix.rs +++ b/src/libstd/path/posix.rs @@ -109,7 +109,7 @@ impl GenericPathUnsafe for Path { unsafe fn new_unchecked<T: BytesContainer>(path: T) -> Path { let path = Path::normalize(path.container_as_bytes()); assert!(!path.is_empty()); - let idx = path.as_slice().rposition_elem(&SEP_BYTE); + let idx = path.rposition_elem(&SEP_BYTE); Path{ repr: path, sepidx: idx } } @@ -290,7 +290,7 @@ impl GenericPath for Path { } } } - Some(Path::new(comps.as_slice().connect(&SEP_BYTE))) + Some(Path::new(comps.connect(&SEP_BYTE))) } } |
