diff --git a/src/bin/proxmox-backup-client.rs b/src/bin/proxmox-backup-client.rs index b5677cdb..2297d302 100644 --- a/src/bin/proxmox-backup-client.rs +++ b/src/bin/proxmox-backup-client.rs @@ -1466,7 +1466,7 @@ async fn prune_async(mut param: Value) -> Result { if quiet { let list: Vec = data.as_array().unwrap().iter().filter(|item| { item["keep"].as_bool() == Some(false) - }).map(|v| v.clone()).collect(); + }).cloned().collect(); data = list.into(); } diff --git a/src/tape/inventory.rs b/src/tape/inventory.rs index 17832c21..289ef510 100644 --- a/src/tape/inventory.rs +++ b/src/tape/inventory.rs @@ -300,7 +300,7 @@ impl Inventory { } pub fn media_set_start_time(&self, media_set_uuid: &Uuid) -> Option { - self.media_set_start_times.get(media_set_uuid).map(|t| *t) + self.media_set_start_times.get(media_set_uuid).copied() } /// Lookup media set pool diff --git a/src/tape/media_catalog.rs b/src/tape/media_catalog.rs index a3dd04db..d9cdf0ae 100644 --- a/src/tape/media_catalog.rs +++ b/src/tape/media_catalog.rs @@ -323,7 +323,7 @@ impl MediaCatalog { /// Returns the chunk archive file number pub fn lookup_snapshot(&self, snapshot: &str) -> Option { - self.snapshot_index.get(snapshot).map(|n| *n) + self.snapshot_index.get(snapshot).copied() } /// Test if the catalog already contain a chunk @@ -333,7 +333,7 @@ impl MediaCatalog { /// Returns the chunk archive file number pub fn lookup_chunk(&self, digest: &[u8;32]) -> Option { - self.chunk_index.get(digest).map(|n| *n) + self.chunk_index.get(digest).copied() } fn check_register_label(&self, file_number: u64) -> Result<(), Error> {