Skip to content

Commit

Permalink
fix: new lifetime lints
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanpailes committed Oct 8, 2024
1 parent c1c304d commit 9acfd98
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions libshpool/src/daemon/pager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ struct PagerProcGuard<'pager> {
pager_exited: Arc<AtomicBool>,
}

impl<'pager> std::ops::Drop for PagerProcGuard<'pager> {
impl std::ops::Drop for PagerProcGuard<'_> {
fn drop(&mut self) {
if self.pager_exited.load(Ordering::Relaxed) {
// our work here is done
Expand All @@ -342,7 +342,7 @@ impl<'pager> std::ops::Drop for PagerProcGuard<'pager> {
}
}

impl<'pager> PagerProcGuard<'pager> {
impl PagerProcGuard<'_> {
fn kill(&self) -> anyhow::Result<()> {
let pid = if let shpool_pty::fork::Fork::Parent(pid, _) = self.pager_proc {
*pid
Expand Down
2 changes: 1 addition & 1 deletion libshpool/src/test_hooks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl<'a> ScopedEvent<'a> {
}
}

impl<'a> std::ops::Drop for ScopedEvent<'a> {
impl std::ops::Drop for ScopedEvent<'_> {
fn drop(&mut self) {
emit(self.event);
}
Expand Down
2 changes: 1 addition & 1 deletion libshpool/src/tty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ pub struct AttachFlagsGuard<'fd> {
old: Option<termios::Termios>,
}

impl<'fd> std::ops::Drop for AttachFlagsGuard<'fd> {
impl std::ops::Drop for AttachFlagsGuard<'_> {
fn drop(&mut self) {
if let Some(old) = &self.old {
if let Err(e) = termios::tcsetattr(self.fd, SetArg::TCSANOW, old) {
Expand Down

0 comments on commit 9acfd98

Please sign in to comment.