5
0
mirror of git://git.proxmox.com/git/pxar.git synced 2025-01-10 09:17:40 +03:00
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2020-11-27 11:55:07 +01:00
parent 4f2d271a96
commit 9e7287abc1
3 changed files with 8 additions and 3 deletions

View File

@ -81,7 +81,7 @@ impl<T: ReadAt> Accessor<T> {
}
/// Open a directory handle to the root of the pxar archive.
pub fn open_root_ref<'a>(&'a self) -> io::Result<Directory<&'a dyn ReadAt>> {
pub fn open_root_ref(&self) -> io::Result<Directory<&dyn ReadAt>> {
Ok(Directory::new(poll_result_once(
self.inner.open_root_ref(),
)?))

View File

@ -262,7 +262,7 @@ mod futures_writer {
Self { inner: Some(inner) }
}
fn inner_mut(self: &mut Self) -> io::Result<Pin<&mut T>> {
fn inner_mut(&mut self) -> io::Result<Pin<&mut T>> {
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<Pin<&mut T>> {
fn inner_mut(&mut self) -> io::Result<Pin<&mut T>> {
let inner = self
.inner
.as_mut()

View File

@ -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,