File tree 1 file changed +5
-8
lines changed
compiler/rustc_query_system/src/query
1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -125,18 +125,15 @@ where
125
125
// We use try_lock_shards here since we are called from the
126
126
// deadlock handler, and this shouldn't be locked.
127
127
let shards = self . shards . try_lock_shards ( ) ?;
128
- let shards = shards. iter ( ) . enumerate ( ) ;
129
- jobs. extend ( shards. flat_map ( |( shard_id, shard) | {
130
- shard. active . iter ( ) . filter_map ( move |( k, v) | {
128
+ for ( shard_id, shard) in shards. iter ( ) . enumerate ( ) {
129
+ for ( k, v) in shard. active . iter ( ) {
131
130
if let QueryResult :: Started ( ref job) = * v {
132
131
let id = QueryJobId :: new ( job. id , shard_id, kind) ;
133
132
let info = QueryInfo { span : job. span , query : make_query ( tcx, k. clone ( ) ) } ;
134
- Some ( ( id, QueryJobInfo { info, job : job. clone ( ) } ) )
135
- } else {
136
- None
133
+ jobs. insert ( id, QueryJobInfo { info, job : job. clone ( ) } ) ;
137
134
}
138
- } )
139
- } ) ) ;
135
+ }
136
+ }
140
137
141
138
Some ( ( ) )
142
139
}
You can’t perform that action at this time.
0 commit comments