File tree Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -234,27 +234,26 @@ impl<'a> Graph<'a> {
234
234
let mut dupes: Vec < ( & Node , usize ) > = packages
235
235
. into_iter ( )
236
236
. filter ( |( _name, indexes) | {
237
- let mut pkg_map = HashMap :: new ( ) ;
238
237
indexes
239
238
. into_iter ( )
240
- . filter ( |( node, _) | {
241
- // Do not treat duplicates on the host or target as duplicates.
242
- let ignore_kind_package = match node {
239
+ . map ( |( node, _) | {
240
+ match node {
243
241
Node :: Package {
244
242
package_id,
245
243
features,
246
244
..
247
- } => Node :: Package {
248
- package_id : package_id. clone ( ) ,
249
- features : features. clone ( ) ,
250
- kind : CompileKind :: Host ,
251
- } ,
245
+ } => {
246
+ // Do not treat duplicates on the host or target as duplicates.
247
+ Node :: Package {
248
+ package_id : package_id. clone ( ) ,
249
+ features : features. clone ( ) ,
250
+ kind : CompileKind :: Host ,
251
+ }
252
+ }
252
253
_ => unreachable ! ( ) ,
253
- } ;
254
- !pkg_map. contains_key ( & ignore_kind_package)
255
- && pkg_map. insert ( ignore_kind_package, ( ) ) . is_none ( )
254
+ }
256
255
} )
257
- . collect :: < Vec < & ( & Node , usize ) > > ( )
256
+ . collect :: < HashSet < _ > > ( )
258
257
. len ( )
259
258
> 1
260
259
} )
You can’t perform that action at this time.
0 commit comments