From 7f9f06c7b964a58953e5182d559ad0a4d0a5136e Mon Sep 17 00:00:00 2001 From: Michal Filka Date: Thu, 11 Apr 2024 11:14:49 +0200 Subject: [PATCH] Minor tweaks --- rust/agama-server/src/web/service.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rust/agama-server/src/web/service.rs b/rust/agama-server/src/web/service.rs index fcf9dff091..31af807388 100644 --- a/rust/agama-server/src/web/service.rs +++ b/rust/agama-server/src/web/service.rs @@ -4,16 +4,15 @@ use axum::{ body::Body, extract::Request, middleware, - response::IntoResponse, - response::Response, + response::{IntoResponse, Response}, routing::{get, post}, Router, }; +use std::time::Duration; use std::{ convert::Infallible, path::{Path, PathBuf}, }; -use std::time::Duration; use tower::Service; use tower_http::{compression::CompressionLayer, services::ServeDir, trace::TraceLayer}; use tracing::Span; @@ -101,7 +100,7 @@ impl MainServiceBuilder { 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)