diff options
Diffstat (limited to 'src/util/version.rs')
-rw-r--r-- | src/util/version.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/util/version.rs b/src/util/version.rs index 2b2ea271..19907ed1 100644 --- a/src/util/version.rs +++ b/src/util/version.rs @@ -1,18 +1,14 @@ use std::sync::Arc; -use arc_swap::{ArcSwap, ArcSwapOption}; +use arc_swap::ArcSwapOption; lazy_static::lazy_static! { - static ref VERSION: ArcSwap<&'static str> = ArcSwap::new(Arc::new(git_version::git_version!( - prefix = "git:", - cargo_prefix = "cargo:", - fallback = "unknown" - ))); + static ref VERSION: ArcSwapOption<&'static str> = ArcSwapOption::new(None); static ref FEATURES: ArcSwapOption<&'static [&'static str]> = ArcSwapOption::new(None); } pub fn garage_version() -> &'static str { - &VERSION.load() + VERSION.load().as_ref().unwrap() } pub fn garage_features() -> Option<&'static [&'static str]> { @@ -20,7 +16,7 @@ pub fn garage_features() -> Option<&'static [&'static str]> { } pub fn init_version(version: &'static str) { - VERSION.store(Arc::new(version)); + VERSION.store(Some(Arc::new(version))); } pub fn init_features(features: &'static [&'static str]) { |