Replace lazy_static with once_cell

This commit is contained in:
Hirrolot 2022-02-04 20:14:57 +06:00
parent 9efa2f6cbd
commit 09c3424097
2 changed files with 3 additions and 5 deletions

View file

@ -96,7 +96,7 @@ aquamarine = "0.1.11"
smart-default = "0.6.0"
rand = "0.8.3"
pretty_env_logger = "0.4.0"
lazy_static = "1.4.0"
once_cell = "1.9.0"
anyhow = "1.0.52"
serde = "1"
serde_json = "1"

View file

@ -2,12 +2,10 @@
use std::sync::atomic::{AtomicU64, Ordering};
use lazy_static::lazy_static;
use once_cell::sync::Lazy;
use teloxide::prelude2::*;
lazy_static! {
static ref MESSAGES_TOTAL: AtomicU64 = AtomicU64::new(0);
}
static MESSAGES_TOTAL: Lazy<AtomicU64> = Lazy::new(AtomicU64::default);
#[tokio::main]
async fn main() {