File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
src/cargo/ops/cargo_compile Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -286,8 +286,8 @@ impl<'a> UnitGenerator<'a, '_> {
286
286
}
287
287
} ;
288
288
289
+ let mut msg = String :: new ( ) ;
289
290
if !suggestion. is_empty ( ) {
290
- let mut msg = String :: new ( ) ;
291
291
writeln ! (
292
292
msg,
293
293
"no {} target {} `{}`{}" ,
@@ -297,10 +297,7 @@ impl<'a> UnitGenerator<'a, '_> {
297
297
suggestion
298
298
) ?;
299
299
append_targets_elsewhere ( & mut msg) ?;
300
-
301
- anyhow:: bail!( msg) ;
302
300
} else {
303
- let mut msg = String :: new ( ) ;
304
301
writeln ! (
305
302
msg,
306
303
"no {} target {} `{}`." ,
@@ -315,8 +312,8 @@ impl<'a> UnitGenerator<'a, '_> {
315
312
writeln ! ( msg, " {}" , target. name( ) ) ?;
316
313
}
317
314
}
318
- anyhow:: bail!( msg) ;
319
315
}
316
+ anyhow:: bail!( msg) ;
320
317
}
321
318
Ok ( proposals)
322
319
}
You can’t perform that action at this time.
0 commit comments