mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-24 23:57:38 +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"
|
smart-default = "0.6.0"
|
||||||
rand = "0.8.3"
|
rand = "0.8.3"
|
||||||
pretty_env_logger = "0.4.0"
|
pretty_env_logger = "0.4.0"
|
||||||
lazy_static = "1.4.0"
|
once_cell = "1.9.0"
|
||||||
anyhow = "1.0.52"
|
anyhow = "1.0.52"
|
||||||
serde = "1"
|
serde = "1"
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
|
|
|
@ -2,12 +2,10 @@
|
||||||
|
|
||||||
use std::sync::atomic::{AtomicU64, Ordering};
|
use std::sync::atomic::{AtomicU64, Ordering};
|
||||||
|
|
||||||
use lazy_static::lazy_static;
|
use once_cell::sync::Lazy;
|
||||||
use teloxide::prelude2::*;
|
use teloxide::prelude2::*;
|
||||||
|
|
||||||
lazy_static! {
|
static MESSAGES_TOTAL: Lazy<AtomicU64> = Lazy::new(AtomicU64::default);
|
||||||
static ref MESSAGES_TOTAL: AtomicU64 = AtomicU64::new(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue