Skip to content

Commit 8fb92ff

Browse files
committed
Resolve uninlined_format_args pedantic clippy lint in build script
warning: variables can be used directly in the `format!` string --> build.rs:140:9 | 140 | / eprintln!( 141 | | "Environment variable ${} is not set during execution of build script", 142 | | key, 143 | | ); | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args = note: `-W clippy::uninlined-format-args` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::uninlined_format_args)]`
1 parent 0e2bef9 commit 8fb92ff

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

build.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,7 @@ fn compile_probe(rustc_bootstrap: bool) -> bool {
137137

138138
fn cargo_env_var(key: &str) -> OsString {
139139
env::var_os(key).unwrap_or_else(|| {
140-
eprintln!(
141-
"Environment variable ${} is not set during execution of build script",
142-
key,
143-
);
140+
eprintln!("Environment variable ${key} is not set during execution of build script");
144141
process::exit(1);
145142
})
146143
}

0 commit comments

Comments
 (0)