@@ -186,27 +186,20 @@ impl Step for ToolBuild {
186
186
than in a previous build:\n ") ;
187
187
println ! ( "the following dependencies are duplicated although they \
188
188
have the same features enabled:") ;
189
- for ( id, cur, prev) in & duplicates {
189
+ for ( id, cur, prev) in duplicates. drain_filter ( | ( _ , cur , prev ) | cur . 2 == prev . 2 ) {
190
190
println ! ( " {}" , id) ;
191
- if cur. 2 == prev. 2 {
192
- // same features
193
- println ! ( " `{}` ({:?})\n `{}` ({:?})" , cur. 0 , cur. 1 , prev. 0 , prev. 1 ) ;
194
- }
191
+ // same features
192
+ println ! ( " `{}` ({:?})\n `{}` ({:?})" , cur. 0 , cur. 1 , prev. 0 , prev. 1 ) ;
195
193
}
196
194
println ! ( "the following dependencies have different features:" ) ;
197
195
for ( id, cur, prev) in duplicates {
198
196
println ! ( " {}" , id) ;
199
- if cur. 2 == prev. 2 {
200
- continue ;
201
- }
202
197
let cur_features: HashSet < _ > = cur. 2 . into_iter ( ) . collect ( ) ;
203
198
let prev_features: HashSet < _ > = prev. 2 . into_iter ( ) . collect ( ) ;
204
- let cur_extra: Vec < _ > = cur_features. difference ( & prev_features) . collect ( ) ;
205
- let prev_extra: Vec < _ > = prev_features. difference ( & cur_features) . collect ( ) ;
206
199
println ! ( " `{}` additionally enabled features {:?} at {:?}" ,
207
- cur. 0 , cur_extra , cur. 1 ) ;
200
+ cur. 0 , & cur_features - & prev_features , cur. 1 ) ;
208
201
println ! ( " `{}` additionally enabled features {:?} at {:?}" ,
209
- prev. 0 , prev_extra , prev. 1 ) ;
202
+ prev. 0 , & prev_features - & cur_features , prev. 1 ) ;
210
203
}
211
204
println ! ( "" ) ;
212
205
panic ! ( "tools should not compile multiple copies of the same crate" ) ;
0 commit comments