diff --git a/src/core/version.rs b/src/core/version.rs index bd89bee2..2876cea8 100644 --- a/src/core/version.rs +++ b/src/core/version.rs @@ -27,5 +27,11 @@ fn init_user_agent() -> String { format!("{}/{}", name(), version()) } fn init_version() -> String { option_env!("CONDUWUIT_VERSION_EXTRA") .or(option_env!("CONDUIT_VERSION_EXTRA")) - .map_or(SEMANTIC.to_owned(), |extra| format!("{SEMANTIC} ({extra})")) + .map_or(SEMANTIC.to_owned(), |extra| { + if extra.is_empty() { + SEMANTIC.to_owned() + } else { + format!("{SEMANTIC} ({extra})") + } + }) }