mirror of
https://github.com/Noratrieb/cargo-minimize.git
synced 2026-01-14 08:25:01 +01:00
allow non-parallel
This commit is contained in:
parent
2b6a1b30e0
commit
17c4323264
1 changed files with 14 additions and 6 deletions
|
|
@ -42,14 +42,22 @@ fn full_tests() -> Result<()> {
|
|||
.map(|e| e.map_err(Into::into))
|
||||
.collect::<Result<Vec<_>>>()?;
|
||||
|
||||
children
|
||||
.into_par_iter()
|
||||
.map(|child| {
|
||||
if std::env::var("PARALLEL").as_deref() != Ok("0") {
|
||||
children
|
||||
.into_par_iter()
|
||||
.map(|child| {
|
||||
let path = child.path();
|
||||
|
||||
build(&path).with_context(|| format!("building {:?}", path.file_name().unwrap()))
|
||||
})
|
||||
.collect::<Result<Vec<_>>>()?;
|
||||
} else {
|
||||
for child in children {
|
||||
let path = child.path();
|
||||
|
||||
build(&path).with_context(|| format!("building {:?}", path.file_name().unwrap()))
|
||||
})
|
||||
.collect::<Result<Vec<_>>>()?;
|
||||
build(&path).with_context(|| format!("building {:?}", path.file_name().unwrap()))?;
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue