push: clippy fixes

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2024-11-20 14:59:46 +01:00
parent 44999809b0
commit aec0ef6260

View File

@ -363,7 +363,7 @@ pub(crate) async fn push_store(mut params: PushParameters) -> Result<SyncStats,
let mut stats = SyncStats::default(); let mut stats = SyncStats::default();
for namespace in &namespaces { for namespace in &namespaces {
let source_store_and_ns = print_store_and_ns(params.source.store.name(), namespace); let source_store_and_ns = print_store_and_ns(params.source.store.name(), namespace);
let target_namespace = params.map_to_target(&namespace)?; let target_namespace = params.map_to_target(namespace)?;
let target_store_and_ns = print_store_and_ns(params.target.repo.store(), &target_namespace); let target_store_and_ns = print_store_and_ns(params.target.repo.store(), &target_namespace);
info!("----"); info!("----");
@ -411,7 +411,7 @@ pub(crate) async fn push_store(mut params: PushParameters) -> Result<SyncStats,
// Without this pre-filtering, all namespaces unrelated to the sync would be removed! // Without this pre-filtering, all namespaces unrelated to the sync would be removed!
let mut target_sub_namespaces = Vec::new(); let mut target_sub_namespaces = Vec::new();
for namespace in &namespaces { for namespace in &namespaces {
let target_namespace = params.map_to_target(&namespace)?; let target_namespace = params.map_to_target(namespace)?;
let mut sub_namespaces = target_namespaces let mut sub_namespaces = target_namespaces
.iter() .iter()
.filter(|namespace| { .filter(|namespace| {
@ -432,10 +432,10 @@ pub(crate) async fn push_store(mut params: PushParameters) -> Result<SyncStats,
target_sub_namespaces.reverse(); target_sub_namespaces.reverse();
for target_namespace in target_sub_namespaces { for target_namespace in target_sub_namespaces {
if synced_namespaces.contains(&target_namespace) { if synced_namespaces.contains(target_namespace) {
continue; continue;
} }
match remove_target_namespace(&params, &target_namespace).await { match remove_target_namespace(&params, target_namespace).await {
Ok(delete_stats) => { Ok(delete_stats) => {
stats.add(SyncStats::from(RemovedVanishedStats { stats.add(SyncStats::from(RemovedVanishedStats {
snapshots: delete_stats.removed_snapshots(), snapshots: delete_stats.removed_snapshots(),