diff --git a/src/dir_entry.rs b/src/dir_entry.rs index fcaffc81..8275bdaf 100644 --- a/src/dir_entry.rs +++ b/src/dir_entry.rs @@ -78,7 +78,7 @@ impl<'a> DirEntryName<'a> { /// characters will be replaced with '�'. /// /// [`Display`]: core::fmt::Display - pub fn display(&self) -> BytesDisplay { + pub fn display(&self) -> BytesDisplay<'_> { BytesDisplay(self.0) } } diff --git a/src/label.rs b/src/label.rs index 6f9e3dac..3809d03c 100644 --- a/src/label.rs +++ b/src/label.rs @@ -56,7 +56,7 @@ impl Label { /// Null bytes are not included. /// /// [`Display`]: core::fmt::Display - pub fn display(&self) -> BytesDisplay { + pub fn display(&self) -> BytesDisplay<'_> { BytesDisplay(self.as_bytes_up_to_first_null()) } } diff --git a/src/path.rs b/src/path.rs index 72953080..d2aa216f 100644 --- a/src/path.rs +++ b/src/path.rs @@ -281,7 +281,7 @@ impl PathBuf { /// Borrow as a `Path`. #[must_use] - pub fn as_path(&self) -> Path { + pub fn as_path(&self) -> Path<'_> { Path(&self.0) } @@ -296,7 +296,7 @@ impl PathBuf { /// characters will be replaced with '�'. /// /// [`Display`]: core::fmt::Display - pub fn display(&self) -> BytesDisplay { + pub fn display(&self) -> BytesDisplay<'_> { BytesDisplay(&self.0) }