From b0c85c81afda1ff7c0278b93008d9491ce458754 Mon Sep 17 00:00:00 2001 From: Scott Mabin Date: Wed, 6 Nov 2024 12:39:08 +0000 Subject: [PATCH] revert esp-config changes --- esp-config/src/generate.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/esp-config/src/generate.rs b/esp-config/src/generate.rs index 887b15e5dc8..1afa1c92591 100644 --- a/esp-config/src/generate.rs +++ b/esp-config/src/generate.rs @@ -149,17 +149,10 @@ fn emit_configuration( // emit cfgs and set envs for (name, value) in configs.into_iter() { let cfg_name = snake_case(name.trim_start_matches(prefix)); + println!("cargo:rustc-check-cfg=cfg({cfg_name})"); match value { - Value::Bool(b) => { - println!("cargo:rustc-check-cfg=cfg({cfg_name})"); - if *b { - println!("cargo:rustc-cfg={cfg_name}") - } - } - Value::String(v) => { - // TODO we need to emit the other option else we'll get a lint warning... - println!("cargo:rustc-check-cfg=cfg({cfg_name}, values(\"{v}\"))"); - println!("cargo:rustc-cfg={cfg_name}=\"{v}\"") + Value::Bool(true) => { + println!("cargo:rustc-cfg={cfg_name}") } _ => {} }