Skip to content

Commit 7cbc93b

Browse files
committed
elide elidable lifetime in Path::strip_prefix
1 parent 0d0a470 commit 7cbc93b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libstd/path.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1880,15 +1880,15 @@ impl Path {
18801880
/// assert_eq!(path.strip_prefix(prefix), Ok(Path::new("haha/foo.txt")));
18811881
/// ```
18821882
#[stable(since = "1.7.0", feature = "path_strip_prefix")]
1883-
pub fn strip_prefix<'a, P>(&'a self, base: P)
1884-
-> Result<&'a Path, StripPrefixError>
1883+
pub fn strip_prefix<P>(&self, base: P)
1884+
-> Result<&Path, StripPrefixError>
18851885
where P: AsRef<Path>
18861886
{
18871887
self._strip_prefix(base.as_ref())
18881888
}
18891889

1890-
fn _strip_prefix<'a>(&'a self, base: &Path)
1891-
-> Result<&'a Path, StripPrefixError> {
1890+
fn _strip_prefix(&self, base: &Path)
1891+
-> Result<&Path, StripPrefixError> {
18921892
iter_after(self.components(), base.components())
18931893
.map(|c| c.as_path())
18941894
.ok_or(StripPrefixError(()))

0 commit comments

Comments
 (0)