refactor: replace once_cell::sync::Lazy with std::sync::LazyLock

This commit is contained in:
link2xt
2025-04-03 13:32:02 +00:00
committed by l
parent cfaa8ceba2
commit e5b79bf405
20 changed files with 136 additions and 139 deletions

View File

@@ -1,10 +1,10 @@
//! DC release info.
use chrono::NaiveDate;
use once_cell::sync::Lazy;
use std::sync::LazyLock;
const DATE_STR: &str = include_str!("../release-date.in");
/// Last release date.
pub static DATE: Lazy<NaiveDate> =
Lazy::new(|| NaiveDate::parse_from_str(DATE_STR, "%Y-%m-%d").unwrap());
pub static DATE: LazyLock<NaiveDate> =
LazyLock::new(|| NaiveDate::parse_from_str(DATE_STR, "%Y-%m-%d").unwrap());