mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-01 00:00:14 +02:00
Remove B type param: Follow ups (#1789)
Co-authored-by: Jonas Platte <[email protected]> Co-authored-by: Michael Scofield <[email protected]>
This commit is contained in:
co-authored by
Jonas Platte
Michael Scofield
parent
0d50d17304
commit
2ae0cdf7cf
@@ -8,8 +8,7 @@
|
||||
//! ```
|
||||
|
||||
use axum::{
|
||||
extract::MatchedPath,
|
||||
http::Request,
|
||||
extract::{MatchedPath, Request},
|
||||
middleware::{self, Next},
|
||||
response::IntoResponse,
|
||||
routing::get,
|
||||
@@ -94,7 +93,7 @@ fn setup_metrics_recorder() -> PrometheusHandle {
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
async fn track_metrics<B>(req: Request<B>, next: Next<B>) -> impl IntoResponse {
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user