mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Auto merge of #10051 - gilescope:one-waffer-thin-alloc-less, r=Eh2406
no need to clone one less clone, match => if let
This commit is contained in:
commit
fa03f0e169
@ -84,8 +84,6 @@ fn run_unit_tests(
|
||||
script_meta,
|
||||
} in compilation.tests.iter()
|
||||
{
|
||||
let test = unit.target.name().to_string();
|
||||
|
||||
let test_path = unit.target.src_path().path().unwrap();
|
||||
let exe_display = if let TargetKind::Test = unit.target.kind() {
|
||||
format!(
|
||||
@ -117,20 +115,17 @@ fn run_unit_tests(
|
||||
|
||||
let result = cmd.exec();
|
||||
|
||||
match result {
|
||||
Err(e) => {
|
||||
let e = e.downcast::<ProcessError>()?;
|
||||
errors.push((
|
||||
unit.target.kind().clone(),
|
||||
test.clone(),
|
||||
unit.pkg.name().to_string(),
|
||||
e,
|
||||
));
|
||||
if !options.no_fail_fast {
|
||||
break;
|
||||
}
|
||||
if let Err(e) = result {
|
||||
let e = e.downcast::<ProcessError>()?;
|
||||
errors.push((
|
||||
unit.target.kind().clone(),
|
||||
unit.target.name().to_string(),
|
||||
unit.pkg.name().to_string(),
|
||||
e,
|
||||
));
|
||||
if !options.no_fail_fast {
|
||||
break;
|
||||
}
|
||||
Ok(()) => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user