tree-wide: fix needless borrows

found and fixed via clippy

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler
2021-12-30 12:57:37 +01:00
parent a0c69902c8
commit 9a37bd6c84
104 changed files with 238 additions and 241 deletions

View File

@ -325,7 +325,7 @@ impl BlockRestoreDriver for QemuBlockDriver {
match VMStateMap::load_read_only() {
Ok(state) => state
.iter()
.filter_map(|(name, _)| proxmox_sys::systemd::unescape_unit(&name).ok())
.filter_map(|(name, _)| proxmox_sys::systemd::unescape_unit(name).ok())
.collect(),
Err(_) => Vec::new(),
}

View File

@ -175,8 +175,8 @@ async fn list(
client,
crypt_config.clone(),
repo.store(),
&snapshot.group().backup_type(),
&snapshot.group().backup_id(),
snapshot.group().backup_type(),
snapshot.group().backup_id(),
snapshot.backup_time(),
true,
)
@ -209,7 +209,7 @@ async fn list(
.download_dynamic_index(&manifest, CATALOG_NAME)
.await?;
let most_used = index.find_most_used_chunks(8);
let file_info = manifest.lookup_file_info(&CATALOG_NAME)?;
let file_info = manifest.lookup_file_info(CATALOG_NAME)?;
let chunk_reader = RemoteChunkReader::new(
client.clone(),
crypt_config,
@ -348,8 +348,8 @@ async fn extract(
client,
crypt_config.clone(),
repo.store(),
&snapshot.group().backup_type(),
&snapshot.group().backup_id(),
snapshot.group().backup_type(),
snapshot.group().backup_id(),
snapshot.backup_time(),
true,
)