mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-30 00:00:32 +02:00
Implement Deref and DerefMut for built-in extractors (#1922)
This commit is contained in:
@@ -6,7 +6,7 @@ use axum::{
|
||||
};
|
||||
use http::{request::Parts, StatusCode};
|
||||
use serde::de::DeserializeOwned;
|
||||
use std::{fmt, ops::Deref};
|
||||
use std::fmt;
|
||||
|
||||
/// Extractor that deserializes query strings into some type.
|
||||
///
|
||||
@@ -73,13 +73,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Deref for Query<T> {
|
||||
type Target = T;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
axum_core::__impl_deref!(Query);
|
||||
|
||||
/// Rejection used for [`Query`].
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user