@@ -95,17 +95,25 @@ impl VersionedContentMap {
9595 client_output_path : Vc < FileSystemPath > ,
9696 ) -> Result < Vc < OptionMapEntry > > {
9797 let assets = * assets_operation. await ?;
98- let entries: Vec < _ > = assets
99- . await ?
100- . iter ( )
101- . map ( |& asset| async move { Ok ( ( asset. ident ( ) . path ( ) . resolve ( ) . await ?, asset, assets) ) } )
102- . try_join ( )
103- . await ?;
104-
98+ async fn get_entries (
99+ assets : Vc < OutputAssets > ,
100+ ) -> Result < Vec < ( Vc < FileSystemPath > , Vc < Box < dyn OutputAsset > > ) > > {
101+ let assets_ref = assets. await ?;
102+ let entries = assets_ref
103+ . iter ( )
104+ . map ( |& asset| async move {
105+ let path = asset. ident ( ) . path ( ) . resolve ( ) . await ?;
106+ Ok ( ( path, asset) )
107+ } )
108+ . try_join ( )
109+ . await ?;
110+ Ok ( entries)
111+ }
112+ let entries = get_entries ( assets) . await . unwrap_or_default ( ) ;
105113 self . await ?. map_path_to_op . update_conditionally ( |map| {
106114 let mut changed = false ;
107- for & ( k, _, v ) in entries. iter ( ) {
108- if map. insert ( k, v ) != Some ( v ) {
115+ for & ( k, _) in entries. iter ( ) {
116+ if map. insert ( k, assets ) != Some ( assets ) {
109117 changed = true ;
110118 }
111119 }
@@ -116,7 +124,7 @@ impl VersionedContentMap {
116124 let map_entry = Vc :: cell ( Some ( MapEntry {
117125 assets_operation : assets,
118126 side_effects,
119- path_to_asset : entries. into_iter ( ) . map ( | ( k , v , _ ) | ( k , v ) ) . collect ( ) ,
127+ path_to_asset : entries. into_iter ( ) . collect ( ) ,
120128 } ) ) ;
121129 Ok ( map_entry)
122130 }
0 commit comments