@@ -2,8 +2,8 @@ use anyhow::Result;
2
2
use tracing:: Instrument ;
3
3
use turbo_rcstr:: RcStr ;
4
4
use turbo_tasks:: {
5
- FxIndexMap , FxIndexSet , ResolvedVc , TryFlatJoinIterExt , TryJoinIterExt , Value , ValueToString ,
6
- Vc ,
5
+ primitives :: HashableHashSet , FxIndexMap , ResolvedVc , TryFlatJoinIterExt , TryJoinIterExt , Value ,
6
+ ValueToString , Vc ,
7
7
} ;
8
8
use turbo_tasks_fs:: FileSystemPath ;
9
9
use turbopack_core:: {
@@ -198,7 +198,7 @@ pub async fn get_app_client_references_chunks(
198
198
ChunkGroup :: SharedMerged {
199
199
parent : * chunk_group_info
200
200
. get_index_of ( ChunkGroup :: Entry {
201
- entries : vec ! [ rsc_entry] ,
201
+ entries : [ rsc_entry] . into_iter ( ) . collect ( ) ,
202
202
ty : ChunkGroupType :: Entry ,
203
203
} )
204
204
. await ?,
@@ -208,7 +208,9 @@ pub async fn get_app_client_references_chunks(
208
208
. iter ( )
209
209
. map ( async |m| Ok ( ResolvedVc :: upcast ( m. await ?. module ) ) )
210
210
. try_join ( )
211
- . await ?,
211
+ . await ?
212
+ . into_iter ( )
213
+ . collect ( ) ,
212
214
}
213
215
} )
214
216
. await ?;
@@ -229,7 +231,7 @@ pub async fn get_app_client_references_chunks(
229
231
)
230
232
} ;
231
233
232
- let mut ssr_modules = client_reference_types
234
+ let ssr_modules: HashableHashSet < _ > = client_reference_types
233
235
. iter ( )
234
236
. map ( |client_reference_ty| async move {
235
237
Ok ( match client_reference_ty {
@@ -247,18 +249,9 @@ pub async fn get_app_client_references_chunks(
247
249
} )
248
250
} )
249
251
. try_flat_join ( )
250
- . await ?;
251
- if server_component. is_none ( ) {
252
- // client_reference_types contains every client reference proxy twice
253
- // (<evaluation> and the regular module), so mapping this into ssr_module leads
254
- // to duplicates.
255
- ssr_modules = ssr_modules
256
- . into_iter ( )
257
- . collect :: < FxIndexSet < _ > > ( )
258
- . into_iter ( )
259
- . collect ( ) ;
260
- }
261
-
252
+ . await ?
253
+ . into_iter ( )
254
+ . collect ( ) ;
262
255
let ssr_chunk_group = if !ssr_modules. is_empty ( ) {
263
256
ssr_chunking_context. map ( |ssr_chunking_context| {
264
257
let _span = tracing:: info_span!(
@@ -282,7 +275,7 @@ pub async fn get_app_client_references_chunks(
282
275
None
283
276
} ;
284
277
285
- let mut client_modules = client_reference_types
278
+ let client_modules: HashableHashSet < _ > = client_reference_types
286
279
. iter ( )
287
280
. map ( |client_reference_ty| async move {
288
281
Ok ( match client_reference_ty {
@@ -297,17 +290,9 @@ pub async fn get_app_client_references_chunks(
297
290
} )
298
291
} )
299
292
. try_join ( )
300
- . await ?;
301
- if server_component. is_none ( ) {
302
- // client_reference_types contains every client reference proxy twice
303
- // (<evaluation> and the regular module), so mapping this into client_modules
304
- // leads to duplicates.
305
- client_modules = client_modules
306
- . into_iter ( )
307
- . collect :: < FxIndexSet < _ > > ( )
308
- . into_iter ( )
309
- . collect ( ) ;
310
- }
293
+ . await ?
294
+ . into_iter ( )
295
+ . collect ( ) ;
311
296
let client_chunk_group = if !client_modules. is_empty ( ) {
312
297
let _span = tracing:: info_span!(
313
298
"client side rendering" ,
0 commit comments