File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
src/cargo/ops/cargo_compile Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -282,8 +282,8 @@ impl<'a> UnitGenerator<'a, '_> {
282282 CargoResult :: Ok ( ( ) )
283283 } ;
284284
285+ let mut msg = String :: new ( ) ;
285286 if !suggestion. is_empty ( ) {
286- let mut msg = String :: new ( ) ;
287287 write ! (
288288 msg,
289289 "no {} target {} `{}`{}{}" ,
@@ -298,9 +298,7 @@ impl<'a> UnitGenerator<'a, '_> {
298298 } ,
299299 ) ?;
300300 append_targets_elsewhere ( & mut msg) ?;
301- anyhow:: bail!( msg) ;
302301 } else {
303- let mut msg = String :: new ( ) ;
304302 writeln ! (
305303 msg,
306304 "no {} target {} `{}`." ,
@@ -316,8 +314,8 @@ impl<'a> UnitGenerator<'a, '_> {
316314 writeln ! ( msg, " {}" , target. name( ) ) ?;
317315 }
318316 }
319- anyhow:: bail!( msg) ;
320317 }
318+ anyhow:: bail!( msg) ;
321319 }
322320 Ok ( proposals)
323321 }
You can’t perform that action at this time.
0 commit comments