Skip to content

Commit

Permalink
Fix clippy error
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Gjengset committed Jun 18, 2021
1 parent 6c31e5b commit eebae67
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions build.rs
Expand Up @@ -69,14 +69,15 @@ fn compile_probe() -> Option<ExitStatus> {
fs::write(&probefile, PROBE).ok()?;

// Make sure to pick up Cargo rustc configuration.
let mut cmd = if let Some(wrapper) = env::var_os("CARGO_RUSTC_WRAPPER") {
let mut cmd = Command::new(wrapper);
// The wrapper's first argument should always be the path to rustc.
cmd.arg(rustc);
cmd
} else {
Command::new(rustc)
};
let mut cmd = env::var_os("CARGO_RUSTC_WRAPPER").map_or_else(
|| Command::new(&rustc),
|wrapper| {
let mut cmd = Command::new(wrapper);
// The wrapper's first argument should always be the path to rustc.
cmd.arg(&rustc);
cmd
},
);

cmd.stderr(Stdio::null())
.arg("--edition=2018")
Expand Down

0 comments on commit eebae67

Please sign in to comment.