allow non-parallel

This commit is contained in:
nora 2023-04-04 15:17:19 +02:00
parent 2b6a1b30e0
commit 17c4323264

View file

@ -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(())
} }