mirror of
https://github.com/Noratrieb/cargo-minimize.git
synced 2026-01-14 16:35: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))
|
.map(|e| e.map_err(Into::into))
|
||||||
.collect::<Result<Vec<_>>>()?;
|
.collect::<Result<Vec<_>>>()?;
|
||||||
|
|
||||||
children
|
if std::env::var("PARALLEL").as_deref() != Ok("0") {
|
||||||
.into_par_iter()
|
children
|
||||||
.map(|child| {
|
.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();
|
let path = child.path();
|
||||||
|
|
||||||
build(&path).with_context(|| format!("building {:?}", path.file_name().unwrap()))
|
build(&path).with_context(|| format!("building {:?}", path.file_name().unwrap()))?;
|
||||||
})
|
}
|
||||||
.collect::<Result<Vec<_>>>()?;
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue