1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-02-22 12:13:16 +01:00

fix: remove trait bound

This commit is contained in:
Roms1383 2024-07-15 01:43:30 +07:00
parent 570d0fc156
commit 04e8a417e1

View File

@ -88,10 +88,7 @@ impl<T: DeserializeOwned> Query<T> {
.map_err(QueryPayloadError::Deserialize) .map_err(QueryPayloadError::Deserialize)
} }
#[cfg(feature = "beautify-errors")] #[cfg(feature = "beautify-errors")]
pub fn from_query(query_str: &str) -> Result<Self, QueryPayloadError> pub fn from_query(query_str: &str) -> Result<Self, QueryPayloadError> {
where
T: de::DeserializeOwned,
{
let deserializer = serde_urlencoded::Deserializer::new(parse(query_str.as_bytes())); let deserializer = serde_urlencoded::Deserializer::new(parse(query_str.as_bytes()));
let qs = serde_path_to_error::deserialize(deserializer) let qs = serde_path_to_error::deserialize(deserializer)
.map(Self) .map(Self)