Skip to content

Commit ea9eef8

Browse files
committed
Clippy cleanup: mismatched_lifetime_syntaxes
1 parent 48ed342 commit ea9eef8

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/dir.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ impl Dir {
119119
}
120120

121121
/// Returns an iterator of `Result<Entry>` which rewinds when finished.
122-
pub fn iter(&mut self) -> Iter {
122+
pub fn iter(&mut self) -> Iter<'_> {
123123
Iter(self)
124124
}
125125
}
@@ -133,7 +133,7 @@ impl Dir {
133133
unsafe impl Send for Dir {}
134134

135135
impl std::os::fd::AsFd for Dir {
136-
fn as_fd(&self) -> std::os::fd::BorrowedFd {
136+
fn as_fd(&self) -> std::os::fd::BorrowedFd<'_> {
137137
let raw_fd = self.as_raw_fd();
138138

139139
// SAFETY:

src/sys/eventfd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl EventFd {
101101
}
102102
}
103103
impl AsFd for EventFd {
104-
fn as_fd(&self) -> BorrowedFd {
104+
fn as_fd(&self) -> BorrowedFd<'_> {
105105
self.0.as_fd()
106106
}
107107
}

src/sys/select.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl<'fd> FdSet<'fd> {
107107
/// assert_eq!(fds, vec![4, 9]);
108108
/// ```
109109
#[inline]
110-
pub fn fds(&self, highest: Option<RawFd>) -> Fds {
110+
pub fn fds(&self, highest: Option<RawFd>) -> Fds<'_, '_> {
111111
Fds {
112112
set: self,
113113
range: 0..highest.map(|h| h as usize + 1).unwrap_or(FD_SETSIZE),

src/sys/socket/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ impl<S> RecvMsg<'_, '_, S> {
701701
/// Iterate over the valid control messages pointed to by this msghdr. If
702702
/// allocated space for CMSGs was too small it is not safe to iterate,
703703
/// instead return an `Error::ENOBUFS` error.
704-
pub fn cmsgs(&self) -> Result<CmsgIterator> {
704+
pub fn cmsgs(&self) -> Result<CmsgIterator<'_>> {
705705

706706
if self.mhdr.msg_flags & MSG_CTRUNC == MSG_CTRUNC {
707707
return Err(Errno::ENOBUFS);

src/sys/termios.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ impl Termios {
178178
///
179179
/// This is not part of `nix`'s public API because it requires additional work to maintain type
180180
/// safety.
181-
pub(crate) fn get_libc_termios(&self) -> Ref<libc::termios> {
181+
pub(crate) fn get_libc_termios(&self) -> Ref<'_, libc::termios> {
182182
{
183183
let mut termios = self.inner.borrow_mut();
184184
termios.c_iflag = self.input_flags.bits();

0 commit comments

Comments
 (0)