@@ -176,12 +176,11 @@ impl Outcome {
176
176
source : Option < & std:: path:: PathBuf > ,
177
177
sequence_number : usize ,
178
178
) -> bool {
179
- self . attrs_stack . extend ( attrs. filter_map ( |attr| {
180
- self . matches_by_id [ attr. id . 0 ]
181
- . r#match
182
- . is_none ( )
183
- . then ( || ( attr. id , attr. inner . clone ( ) , None ) )
184
- } ) ) ;
179
+ self . attrs_stack . extend (
180
+ attrs
181
+ . filter ( |attr| self . matches_by_id [ attr. id . 0 ] . r#match . is_none ( ) )
182
+ . map ( |attr| ( attr. id , attr. inner . clone ( ) , None ) ) ,
183
+ ) ;
185
184
while let Some ( ( id, assignment, parent_order) ) = self . attrs_stack . pop ( ) {
186
185
let slot = & mut self . matches_by_id [ id. 0 ] ;
187
186
if slot. r#match . is_some ( ) {
@@ -212,12 +211,12 @@ impl Outcome {
212
211
if is_macro {
213
212
// TODO(borrowchk): one fine day we should be able to re-borrow `slot` without having to redo the array access.
214
213
let slot = & self . matches_by_id [ id. 0 ] ;
215
- self . attrs_stack . extend ( slot . macro_attributes . iter ( ) . filter_map ( |attr| {
216
- self . matches_by_id [ attr . id . 0 ]
217
- . r#match
218
- . is_none ( )
219
- . then ( | | ( attr. id , attr. inner . clone ( ) , Some ( id) ) )
220
- } ) ) ;
214
+ self . attrs_stack . extend (
215
+ slot . macro_attributes
216
+ . iter ( )
217
+ . filter ( |attr| self . matches_by_id [ attr . id . 0 ] . r#match . is_none ( ) )
218
+ . map ( |attr | ( attr. id , attr. inner . clone ( ) , Some ( id) ) ) ,
219
+ ) ;
221
220
}
222
221
}
223
222
false
0 commit comments