Skip to content

Commit 0516bf1

Browse files
committed
add negative cases
1 parent 91dacd3 commit 0516bf1

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/lib.rs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,12 @@ pub fn get_version() -> String {
4444
}
4545

4646
pub fn build_info() -> String {
47-
let mut flags = vec![env!("PROFILE")];
48-
if let Some(rust_flags) = option_env!("RUSTFLAGS") {
49-
if rust_flags.contains("-Cprofile-use=") {
50-
flags.push("pgo");
51-
}
52-
}
53-
if cfg!(feature = "mimalloc") {
54-
flags.push("mimalloc");
55-
}
56-
flags.join(" ")
47+
format!(
48+
"profile={} pgo={} mimalloc={}",
49+
env!("PROFILE"),
50+
option_env!("RUSTFLAGS").unwrap_or("").contains("-Cprofile-use="),
51+
cfg!(feature = "mimalloc")
52+
)
5753
}
5854

5955
#[pymodule]

0 commit comments

Comments
 (0)