From 136d1cec11a0d43904b6f0a2f717d6af5d9c8cc9 Mon Sep 17 00:00:00 2001 From: Michal Filka Date: Thu, 11 Apr 2024 08:03:56 +0200 Subject: [PATCH] Formatting --- rust/agama-server/src/web/service.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/rust/agama-server/src/web/service.rs b/rust/agama-server/src/web/service.rs index f8c064f09d..1c7075a571 100644 --- a/rust/agama-server/src/web/service.rs +++ b/rust/agama-server/src/web/service.rs @@ -59,13 +59,16 @@ impl MainServiceBuilder { )) .route("/ping", get(super::http::ping)) .route("/authenticate", post(super::http::authenticate)) - .layer(TraceLayer::new_for_http() - .on_request(|request: &Request, _span: &Span| { - tracing::info!("request: {} {}", request.method(), request.uri().path()) - }) - .on_response(|response: &Response, latency: Duration, _span: &Span| { - tracing::info!("response: {} {:?}", response.status(), latency) - }) + .layer( + TraceLayer::new_for_http() + .on_request(|request: &Request, _span: &Span| { + tracing::info!("request: {} {}", request.method(), request.uri().path()) + }) + .on_response( + |response: &Response, latency: Duration, _span: &Span| { + tracing::info!("response: {} {:?}", response.status(), latency) + }, + ), ) .layer(CompressionLayer::new().br(true)) .with_state(state)