Don't set extension we never use (#844)

* Remove unused internal helper

* Don't set extension we never use
This commit is contained in:
David Pedersen 2022-03-09 11:05:24 +01:00 committed by GitHub
parent f9a94ca7eb
commit 70e3024068
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 5 deletions

View file

@ -15,7 +15,3 @@ pub use bytes::Bytes;
#[doc(inline)]
pub use axum_core::body::{boxed, BoxBody};
pub(crate) fn empty() -> BoxBody {
boxed(Empty::new())
}

View file

@ -421,7 +421,6 @@ where
mut req: Request<B>,
) -> RouteFuture<B, Infallible> {
let id = *match_.value;
req.extensions_mut().insert(id);
#[cfg(feature = "matched-path")]
if let Some(matched_path) = self.node.route_id_to_path.get(&id) {