diff options
Diffstat (limited to 'crates/atuin-common/src/api.rs')
| -rw-r--r-- | crates/atuin-common/src/api.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/crates/atuin-common/src/api.rs b/crates/atuin-common/src/api.rs index 1aaf9859..973bdc8e 100644 --- a/crates/atuin-common/src/api.rs +++ b/crates/atuin-common/src/api.rs @@ -1,17 +1,15 @@ -use lazy_static::lazy_static; use semver::Version; use serde::{Deserialize, Serialize}; use std::borrow::Cow; +use std::sync::LazyLock; use time::OffsetDateTime; // the usage of X- has been deprecated for quite along time, it turns out pub static ATUIN_HEADER_VERSION: &str = "Atuin-Version"; pub static ATUIN_CARGO_VERSION: &str = env!("CARGO_PKG_VERSION"); -lazy_static! { - pub static ref ATUIN_VERSION: Version = - Version::parse(ATUIN_CARGO_VERSION).expect("failed to parse self semver"); -} +pub static ATUIN_VERSION: LazyLock<Version> = + LazyLock::new(|| Version::parse(ATUIN_CARGO_VERSION).expect("failed to parse self semver")); #[derive(Debug, Serialize, Deserialize)] pub struct UserResponse { |
