mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
Replace lazy_static
with once_cell
This commit is contained in:
parent
9efa2f6cbd
commit
09c3424097
2 changed files with 3 additions and 5 deletions
|
@ -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"
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue