From e27941122c774bf6110d9456960f3aa309c55465 Mon Sep 17 00:00:00 2001 From: Richy Date: Wed, 9 Jul 2025 19:04:17 +0200 Subject: [PATCH] fix: format --- src/api/core/ciphers.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs index fd372b12..1c89aed7 100644 --- a/src/api/core/ciphers.rs +++ b/src/api/core/ciphers.rs @@ -1924,11 +1924,11 @@ impl CipherSyncData { // Generate a HashMap with the collections_uuid as key and the CollectionGroup record let user_collections_groups: HashMap = if CONFIG.org_groups_enabled() { - CollectionGroup::find_by_user(user_id, conn) - .await - .into_iter() - .fold(HashMap::new(), |mut combined_permissions, cg| { - combined_permissions.entry(cg.collections_uuid.clone()) + CollectionGroup::find_by_user(user_id, conn).await.into_iter().fold( + HashMap::new(), + |mut combined_permissions, cg| { + combined_permissions + .entry(cg.collections_uuid.clone()) .and_modify(|existing| { // Combine permissions: take the most permissive settings. existing.read_only &= cg.read_only; // false if ANY group allows write @@ -1937,7 +1937,8 @@ impl CipherSyncData { }) .or_insert(cg); combined_permissions - }) + }, + ) } else { HashMap::new() };