diff --git a/Cargo.toml b/Cargo.toml index baf48bf..02ed392 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bwhc-kafka-rest-proxy" -version = "0.1.1" +version = "0.2.0" edition = "2021" authors = ["Paul-Christian Volkmer "] license = "AGPL-3.0" @@ -12,9 +12,6 @@ description = "bwHC MTB-File REST Proxy für Kafka" version = "4.5" features = ["derive", "env"] -[dependencies.lazy_static] -version = "1.5" - [dependencies.log] version = "0.4" diff --git a/src/main.rs b/src/main.rs index 4b71dd6..4a3e072 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,8 +6,8 @@ use axum::response::{IntoResponse, Response}; use axum::routing::{delete, post}; use axum::{Extension, Router}; use clap::Parser; -use lazy_static::lazy_static; use serde::{Deserialize, Serialize}; +use std::sync::LazyLock; #[cfg(debug_assertions)] use tower_http::trace::TraceLayer; @@ -54,9 +54,7 @@ impl IntoResponse for AppResponse<'_> { } } -lazy_static! { - static ref CONFIG: Cli = Cli::parse(); -} +static CONFIG: LazyLock = LazyLock::new(Cli::parse); #[tokio::main] async fn main() -> Result<(), ()> {