Skip to content

Commit 1c5ddcd

Browse files
committed
make clippy happy
1 parent d003606 commit 1c5ddcd

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

nexus/db-queries/src/db/datastore/scim_provider_store.rs

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -358,20 +358,22 @@ impl<'a> CrdbScimProviderStore<'a> {
358358
// Select user fields and optional group fields
359359
// Note: We need to explicitly select the group columns to work with the
360360
// boxed query and LEFT JOIN
361-
let rows: Vec<(model::SiloUser, Option<(Uuid, Option<String>)>)> =
362-
query
363-
.select((
364-
model::SiloUser::as_select(),
365-
(group_dsl::id, group_dsl::display_name).nullable(),
366-
))
367-
.load_async(conn)
368-
.await?;
369-
370-
// Group the results by user_id
371-
let mut users_map: HashMap<
361+
type UserRow = (model::SiloUser, Option<(Uuid, Option<String>)>);
362+
type UsersMap = HashMap<
372363
Uuid,
373364
(Option<model::SiloUser>, Vec<(SiloGroupUuid, String)>),
374-
> = HashMap::new();
365+
>;
366+
367+
let rows: Vec<UserRow> = query
368+
.select((
369+
model::SiloUser::as_select(),
370+
(group_dsl::id, group_dsl::display_name).nullable(),
371+
))
372+
.load_async(conn)
373+
.await?;
374+
375+
// Group the results by user_id
376+
let mut users_map: UsersMap = HashMap::new();
375377

376378
for (user, maybe_group_info) in rows {
377379
let user_id = user.identity.id.into_untyped_uuid();

0 commit comments

Comments
 (0)