1
0
mirror of https://github.com/CCC-MF/bwhc-kafka-rest-proxy.git synced 2025-04-19 19:16:51 +00:00

feat: remove use of lazy_static

This commit is contained in:
Paul-Christian Volkmer 2025-04-07 20:16:43 +02:00
parent 21f0c515a0
commit 2a6e4a5c8c
2 changed files with 3 additions and 8 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "bwhc-kafka-rest-proxy" name = "bwhc-kafka-rest-proxy"
version = "0.1.1" version = "0.2.0"
edition = "2021" edition = "2021"
authors = ["Paul-Christian Volkmer <volkmer_p@ukw.de>"] authors = ["Paul-Christian Volkmer <volkmer_p@ukw.de>"]
license = "AGPL-3.0" license = "AGPL-3.0"
@ -12,9 +12,6 @@ description = "bwHC MTB-File REST Proxy für Kafka"
version = "4.5" version = "4.5"
features = ["derive", "env"] features = ["derive", "env"]
[dependencies.lazy_static]
version = "1.5"
[dependencies.log] [dependencies.log]
version = "0.4" version = "0.4"

View File

@ -6,8 +6,8 @@ use axum::response::{IntoResponse, Response};
use axum::routing::{delete, post}; use axum::routing::{delete, post};
use axum::{Extension, Router}; use axum::{Extension, Router};
use clap::Parser; use clap::Parser;
use lazy_static::lazy_static;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use std::sync::LazyLock;
#[cfg(debug_assertions)] #[cfg(debug_assertions)]
use tower_http::trace::TraceLayer; use tower_http::trace::TraceLayer;
@ -54,9 +54,7 @@ impl IntoResponse for AppResponse<'_> {
} }
} }
lazy_static! { static CONFIG: LazyLock<Cli> = LazyLock::new(Cli::parse);
static ref CONFIG: Cli = Cli::parse();
}
#[tokio::main] #[tokio::main]
async fn main() -> Result<(), ()> { async fn main() -> Result<(), ()> {