diff --git a/src/accessor/sync.rs b/src/accessor/sync.rs index 15c99c4..f625e62 100644 --- a/src/accessor/sync.rs +++ b/src/accessor/sync.rs @@ -81,7 +81,7 @@ impl Accessor { } /// Open a directory handle to the root of the pxar archive. - pub fn open_root_ref<'a>(&'a self) -> io::Result> { + pub fn open_root_ref(&self) -> io::Result> { Ok(Directory::new(poll_result_once( self.inner.open_root_ref(), )?)) diff --git a/src/encoder/aio.rs b/src/encoder/aio.rs index 83dd96b..d989abd 100644 --- a/src/encoder/aio.rs +++ b/src/encoder/aio.rs @@ -262,7 +262,7 @@ mod futures_writer { Self { inner: Some(inner) } } - fn inner_mut(self: &mut Self) -> io::Result> { + fn inner_mut(&mut self) -> io::Result> { let inner = self .inner .as_mut() @@ -311,7 +311,7 @@ mod tokio_writer { Self { inner: Some(inner) } } - fn inner_mut(self: &mut Self) -> io::Result> { + fn inner_mut(&mut self) -> io::Result> { let inner = self .inner .as_mut() diff --git a/src/encoder/mod.rs b/src/encoder/mod.rs index 653d601..f186aa8 100644 --- a/src/encoder/mod.rs +++ b/src/encoder/mod.rs @@ -349,6 +349,11 @@ impl<'a, T: SeqWrite + 'a> EncoderImpl<'a, T> { } /// Return a file offset usable with `add_hardlink`. + // This is an `&mut self`, the Rc to the `file_copy_buffer` is handed down in + // `create_directory` which is also an `&mut self` method and returns an encoder holding a + // mutable borrow on `self`, opening a nested entry in the archive. + // So this should be fine. + #[allow(clippy::await_holding_refcell_ref)] pub async fn add_file( &mut self, metadata: &Metadata,