summaryrefslogtreecommitdiff
path: root/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/build.rs b/build.rs
index 857452b..2276f93 100644
--- a/build.rs
+++ b/build.rs
@@ -127,15 +127,11 @@ fn write_out_resource_file<'a>(paths: impl Iterator<Item = &'a Path>) -> Result<
/// to contain `BUILTIN_{var}` to either the env value, or `{def}` if not
/// provided.
fn adopt_env_var(var: &str, def: &str) {
- println!("cargo:rerun-if-env-changed=SUBPLOT_{var}", var = var);
- if let Ok(value) = std::env::var(format!("SUBPLOT_{var}", var = var)) {
- println!(
- "cargo:rustc-env=BUILTIN_{var}={value}",
- var = var,
- value = value
- );
+ println!("cargo:rerun-if-env-changed=SUBPLOT_{var}");
+ if let Ok(value) = std::env::var(format!("SUBPLOT_{var}")) {
+ println!("cargo:rustc-env=BUILTIN_{var}={value}",);
} else {
- println!("cargo:rustc-env=BUILTIN_{var}={def}", var = var, def = def);
+ println!("cargo:rustc-env=BUILTIN_{var}={def}");
}
}