Skip to content

Commit e732821

Browse files
authored
refactor: remove use of lazy_static (#1216)
ref: rust-lang-nursery/lazy-static.rs#214
1 parent f7d366e commit e732821

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

Cargo.lock

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ bytes = "1.4"
106106
clokwerk = "0.4"
107107
derive_more = { version = "1", features = ["full"] }
108108
itertools = "0.14"
109-
lazy_static = "1.4"
110109
once_cell = "1.20"
111110
rand = "0.8.5"
112111
regex = "1.7.3"

src/handlers/http/health_check.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,14 @@ use actix_web::{
2727
HttpResponse,
2828
};
2929
use http::StatusCode;
30+
use once_cell::sync::Lazy;
3031
use tokio::{sync::Mutex, task::JoinSet};
3132
use tracing::{error, info, warn};
3233

3334
use crate::parseable::PARSEABLE;
3435

3536
// Create a global variable to store signal status
36-
lazy_static::lazy_static! {
37-
pub static ref SIGNAL_RECEIVED: Arc<Mutex<bool>> = Arc::new(Mutex::new(false));
38-
}
37+
static SIGNAL_RECEIVED: Lazy<Arc<Mutex<bool>>> = Lazy::new(|| Arc::new(Mutex::new(false)));
3938

4039
pub async fn liveness() -> HttpResponse {
4140
HttpResponse::new(StatusCode::OK)

0 commit comments

Comments
 (0)