Skip to content

Commit

Permalink
Merge branch 'master' into remove-once-cell-dep
Browse files Browse the repository at this point in the history
  • Loading branch information
shssoichiro authored Jan 28, 2024
2 parents b645e9f + 7155fe3 commit f9a67b5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/bin/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,13 @@ fn get_version() -> &'static str {

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

0 comments on commit f9a67b5

Please sign in to comment.