From 8fb92ff3f0c93d08fe2a38fc657649ebfc2b5754 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 31 Oct 2024 16:43:53 -0700 Subject: [PATCH] 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)]` --- build.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/build.rs b/build.rs index 51ac436..4b40e9d 100644 --- a/build.rs +++ b/build.rs @@ -137,10 +137,7 @@ fn compile_probe(rustc_bootstrap: bool) -> bool { fn cargo_env_var(key: &str) -> OsString { env::var_os(key).unwrap_or_else(|| { - eprintln!( - "Environment variable ${} is not set during execution of build script", - key, - ); + eprintln!("Environment variable ${key} is not set during execution of build script"); process::exit(1); }) }