Skip to content

Commit f9a67b5

Browse files
authored
Merge branch 'master' into remove-once-cell-dep
2 parents b645e9f + 7155fe3 commit f9a67b5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/bin/common.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,13 @@ fn get_version() -> &'static str {
275275

276276
fn get_long_version() -> &'static str {
277277
LONG_VERSION_STR.get_or_init(|| {
278-
let mut rustflags = env!("CARGO_ENCODED_RUSTFLAGS");
279-
if rustflags.trim().is_empty() {
280-
rustflags = "(None)";
281-
}
278+
let rustflags = env!("CARGO_ENCODED_RUSTFLAGS");
279+
let rustflags = if rustflags.trim().is_empty() {
280+
"(None)".to_string()
281+
} else {
282+
// Replace non-printable ASCII Unit Separator with whitespace
283+
rustflags.replace(0x1F as char, " ")
284+
};
282285
format!(
283286
"{}\n{} {}\nCompiled CPU Features: {}\nRuntime Assembly Support: {}{}\nThreading: {}\nUnstable Features: {}\nCompiler Flags: {}",
284287
get_version(),

0 commit comments

Comments
 (0)