We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1988bc8 commit 4f706aeCopy full SHA for 4f706ae
src/cargo/core/compiler/build_config.rs
@@ -1,7 +1,7 @@
1
use crate::core::compiler::CompileKind;
2
use crate::util::interning::InternedString;
3
use crate::util::{CargoResult, Config, RustfixDiagnosticServer};
4
-use anyhow::bail;
+use anyhow::{bail, Context as _};
5
use cargo_util::ProcessBuilder;
6
use serde::ser;
7
use std::cell::RefCell;
@@ -73,7 +73,9 @@ impl BuildConfig {
73
}
74
let jobs = match jobs.or(cfg.jobs) {
75
Some(j) => j,
76
- None => available_parallelism()?.get() as u32,
+ None => available_parallelism()
77
+ .context("failed to determine the amount of parallelism available")?
78
+ .get() as u32,
79
};
80
if jobs == 0 {
81
anyhow::bail!("jobs may not be 0");
0 commit comments