diff options
| author | Ellie Huxtable <ellie@atuin.sh> | 2025-03-19 12:44:20 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-19 12:44:20 +0000 |
| commit | 14ec768b4520d4fc34dbf24e663ea7db940c18b7 (patch) | |
| tree | a37db707ab8676cad5b3e6ca47af3f2997958906 /crates/atuin-server/src/metrics.rs | |
| parent | feat: Use readline binding for ctrl-a when it is not the prefix (#2626) (diff) | |
| download | atuin-14ec768b4520d4fc34dbf24e663ea7db940c18b7.zip | |
chore: migrate to rust 2024 (#2635)
* chore: upgrade to 2024 edition
* ugh unsafe
* format
* nixxxxxxxxxxx why
Diffstat (limited to 'crates/atuin-server/src/metrics.rs')
| -rw-r--r-- | crates/atuin-server/src/metrics.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/atuin-server/src/metrics.rs b/crates/atuin-server/src/metrics.rs index 0a7ac6bd..ff0fe925 100644 --- a/crates/atuin-server/src/metrics.rs +++ b/crates/atuin-server/src/metrics.rs @@ -28,10 +28,9 @@ pub fn setup_metrics_recorder() -> PrometheusHandle { pub async fn track_metrics(req: Request, next: Next) -> impl IntoResponse { let start = Instant::now(); - let path = if let Some(matched_path) = req.extensions().get::<MatchedPath>() { - matched_path.as_str().to_owned() - } else { - req.uri().path().to_owned() + let path = match req.extensions().get::<MatchedPath>() { + Some(matched_path) => matched_path.as_str().to_owned(), + _ => req.uri().path().to_owned(), }; let method = req.method().clone(); |
