@@ -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