From 47b76481e51451827530714512b30882d85e3a9a Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sat, 13 Jun 2026 01:36:41 +0200 Subject: chore(treewide): Also fix all `clippy` warnings --- crates/turtle/src/atuin_server/metrics.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/turtle/src/atuin_server/metrics.rs') diff --git a/crates/turtle/src/atuin_server/metrics.rs b/crates/turtle/src/atuin_server/metrics.rs index 556de6fb..6380bef1 100644 --- a/crates/turtle/src/atuin_server/metrics.rs +++ b/crates/turtle/src/atuin_server/metrics.rs @@ -28,10 +28,10 @@ pub(crate) fn setup_metrics_recorder() -> PrometheusHandle { pub(crate) async fn track_metrics(req: Request, next: Next) -> impl IntoResponse { let start = Instant::now(); - let path = match req.extensions().get::() { - Some(matched_path) => matched_path.as_str().to_owned(), - _ => req.uri().path().to_owned(), - }; + let path = req.extensions().get::().map_or_else( + || req.uri().path().to_owned(), + |matched_path| matched_path.as_str().to_owned(), + ); let method = req.method().clone(); -- cgit v1.3.1