@@ -158,34 +158,38 @@ impl Step for ToolBuild {
158
158
a transitive dependency has different features activated \
159
159
than in a previous build:\n "
160
160
) ;
161
- eprintln ! (
162
- "the following dependencies are duplicated although they \
163
- have the same features enabled:"
164
- ) ;
165
161
let ( same, different) : ( Vec < _ > , Vec < _ > ) =
166
162
duplicates. into_iter ( ) . partition ( |( _, cur, prev) | cur. 2 == prev. 2 ) ;
167
- for ( id, cur, prev) in same {
168
- eprintln ! ( " {}" , id) ;
169
- // same features
170
- eprintln ! ( " `{}` ({:?})\n `{}` ({:?})" , cur. 0 , cur. 1 , prev. 0 , prev. 1 ) ;
171
- }
172
- eprintln ! ( "the following dependencies have different features:" ) ;
173
- for ( id, cur, prev) in different {
174
- eprintln ! ( " {}" , id) ;
175
- let cur_features: HashSet < _ > = cur. 2 . into_iter ( ) . collect ( ) ;
176
- let prev_features: HashSet < _ > = prev. 2 . into_iter ( ) . collect ( ) ;
177
- eprintln ! (
178
- " `{}` additionally enabled features {:?} at {:?}" ,
179
- cur. 0 ,
180
- & cur_features - & prev_features,
181
- cur. 1
182
- ) ;
163
+ if !same. is_empty ( ) {
183
164
eprintln ! (
184
- " `{}` additionally enabled features {:?} at {:?}" ,
185
- prev. 0 ,
186
- & prev_features - & cur_features,
187
- prev. 1
165
+ "the following dependencies are duplicated although they \
166
+ have the same features enabled:"
188
167
) ;
168
+ for ( id, cur, prev) in same {
169
+ eprintln ! ( " {}" , id) ;
170
+ // same features
171
+ eprintln ! ( " `{}` ({:?})\n `{}` ({:?})" , cur. 0 , cur. 1 , prev. 0 , prev. 1 ) ;
172
+ }
173
+ }
174
+ if !different. is_empty ( ) {
175
+ eprintln ! ( "the following dependencies have different features:" ) ;
176
+ for ( id, cur, prev) in different {
177
+ eprintln ! ( " {}" , id) ;
178
+ let cur_features: HashSet < _ > = cur. 2 . into_iter ( ) . collect ( ) ;
179
+ let prev_features: HashSet < _ > = prev. 2 . into_iter ( ) . collect ( ) ;
180
+ eprintln ! (
181
+ " `{}` additionally enabled features {:?} at {:?}" ,
182
+ cur. 0 ,
183
+ & cur_features - & prev_features,
184
+ cur. 1
185
+ ) ;
186
+ eprintln ! (
187
+ " `{}` additionally enabled features {:?} at {:?}" ,
188
+ prev. 0 ,
189
+ & prev_features - & cur_features,
190
+ prev. 1
191
+ ) ;
192
+ }
189
193
}
190
194
eprintln ! ( ) ;
191
195
eprintln ! (
0 commit comments