diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2015-01-26 21:21:15 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2015-01-27 09:03:06 -0500 |
| commit | bce81e24647507c82e02e9918f54e8e3a2431149 (patch) | |
| tree | d9137df10f07d1c9c5f8743d02c774a7add29a7f /src/libstd/path | |
| parent | d77f6d5366b330f9c2061cad0d3ff638c9cc05b7 (diff) | |
| download | rust-bce81e24647507c82e02e9918f54e8e3a2431149.tar.gz rust-bce81e24647507c82e02e9918f54e8e3a2431149.zip | |
cleanup: s/`v.slice*()`/`&v[a..b]`/g + remove redundant `as_slice()` calls
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 202d81f5696..360ab2fdf67 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))) } } |
