We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91dacd3 commit 4709c78Copy full SHA for 4709c78
src/lib.rs
@@ -44,16 +44,17 @@ pub fn get_version() -> String {
44
}
45
46
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(" ")
+ let pgo = if option_env!("RUSTFLAGS").unwrap_or("").contains("-Cprofile-use=") {
+ "pgo"
+ } else {
+ "no-pgo"
+ };
+ let allocator = if cfg!(feature = "mimalloc") {
+ "mimalloc"
+ "std-allocator"
57
+ format!("{} {pgo} {allocator}", env!("PROFILE"))
58
59
60
#[pymodule]
0 commit comments