Skip to content

Commit 59b0a36

Browse files
authored
Change example build.rs output to avoid cluttering with cargo warnings (#73)
1 parent 3a58cf9 commit 59b0a36

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

freertos-rust-examples/build.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,18 @@ fn main() {
6464
b.compile().unwrap_or_else(|e| panic!("{}", e));
6565
}
6666

67-
/// Print relevant environment variables
67+
/// Print relevant environment variables.
68+
/// To avoid cluttering the output on each build, this is not displayed in the terminal.
69+
/// See the output in the corresponding target output file e.g. target/debug/build/<pkg>/output
6870
fn print_env() {
6971
let env_keys = ["TARGET", "OUT_DIR", "HOST"];
7072
env::vars().for_each(|(key, val)| {
7173
if key.starts_with("CARGO") {
72-
println!("cargo:warning={}={}", key, val);
74+
println!("{}={}", key, val);
7375
} else if env_keys.contains(&key.as_str()) {
74-
println!("cargo:warning={}={}", key, val);
76+
println!("{}={}", key, val);
7577
} else {
76-
// println!("cargo:warning={}={}", key, val);
78+
// println!("{}={}", key, val);
7779
}
7880
});
7981
}

0 commit comments

Comments
 (0)