From ae386a491b23cfbadc4da8680c8ebcb85310dcb5 Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Fri, 4 Oct 2024 17:23:09 +0200 Subject: rename `serveraddr` to `addr` --- src/config.rs | 4 ++-- src/main.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/config.rs b/src/config.rs index 4b333fe..2e9c1eb 100644 --- a/src/config.rs +++ b/src/config.rs @@ -6,7 +6,7 @@ use crate::auth; #[derive(Debug, Clone, Deserialize)] #[serde(default)] pub struct Config { - pub serveraddr: String, + pub addr: String, pub pingtimeout: i64, pub pingthreshold: u64, pub auth: Auth, @@ -15,7 +15,7 @@ pub struct Config { impl Default for Config { fn default() -> Self { Self { - serveraddr: "0.0.0.0:7229".to_string(), + addr: "0.0.0.0:7229".to_string(), pingtimeout: 10, pingthreshold: 1, auth: Default::default(), diff --git a/src/main.rs b/src/main.rs index b550dd8..352023b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -118,7 +118,7 @@ async fn main() -> color_eyre::eyre::Result<()> { .merge(SwaggerUi::new("/swagger-ui").url("/api-docs/openapi.json", ApiDoc::openapi())) .with_state(Arc::new(shared_state)); - let addr = config.serveraddr; + let addr = config.addr; info!("start server on {}", addr); let listener = tokio::net::TcpListener::bind(addr).await?; axum::serve(listener, app).await?; -- cgit v1.2.3