diff --git a/crates/router/src/core/user.rs b/crates/router/src/core/user.rs index 9422522b8831..7f5eeb5a803d 100644 --- a/crates/router/src/core/user.rs +++ b/crates/router/src/core/user.rs @@ -2585,14 +2585,14 @@ pub async fn list_orgs_for_user( .into_iter() .filter_map(|user_role| { (user_role.status == UserStatus::Active) - .then(|| user_role.org_id) + .then_some( user_role.org_id) .flatten() }) .collect::>(); let resp = futures::future::try_join_all( orgs.iter() - .map(|org_id| state.store.find_organization_by_org_id(&org_id)), + .map(|org_id| state.store.find_organization_by_org_id(org_id)), ) .await .change_context(UserErrors::InternalServerError)? @@ -2651,7 +2651,7 @@ pub async fn list_merchants_for_user_in_org( .into_iter() .filter_map(|user_role| { (user_role.status == UserStatus::Active) - .then(|| user_role.merchant_id) + .then_some( user_role.merchant_id) .flatten() }) .collect::>() @@ -2734,7 +2734,7 @@ pub async fn list_profiles_for_user_in_org_and_merchant_account( .into_iter() .filter_map(|user_role| { (user_role.status == UserStatus::Active) - .then(|| user_role.profile_id) + .then_some( user_role.profile_id) .flatten() }) .collect::>();