pbs-client: pxar: avoid some more clones

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2022-04-13 10:29:33 +02:00
parent 7546e9c997
commit e3746a329e
1 changed files with 3 additions and 3 deletions

View File

@ -565,7 +565,7 @@ where
let entry = entry.map_err(|err| format_err!("cannot decode entry: {}", err))?; let entry = entry.map_err(|err| format_err!("cannot decode entry: {}", err))?;
let metadata = entry.metadata(); let metadata = entry.metadata();
let path = entry.path().strip_prefix(prefix)?.to_path_buf(); let path = entry.path().strip_prefix(prefix)?;
match entry.kind() { match entry.kind() {
EntryKind::File { .. } => { EntryKind::File { .. } => {
@ -603,7 +603,7 @@ where
&path, &path,
) )
.await?; .await?;
hardlinks.insert(realpath.to_owned(), path); hardlinks.insert(realpath.to_owned(), path.to_owned());
continue; continue;
} }
} }
@ -748,7 +748,7 @@ where
{ {
Box::pin(async move { Box::pin(async move {
let metadata = file.entry().metadata(); let metadata = file.entry().metadata();
let path = file.entry().path().strip_prefix(&prefix)?.to_path_buf(); let path = file.entry().path().strip_prefix(&prefix)?;
match file.kind() { match file.kind() {
EntryKind::File { .. } => { EntryKind::File { .. } => {