This commit is contained in:
Nikolay Kim 2021-12-24 03:54:57 +06:00
parent f0f899a36e
commit 15025b89c1
14 changed files with 34 additions and 82 deletions

View file

@ -163,9 +163,7 @@ impl<T: ResourcePath> Path<T> {
}
/// Try to deserialize matching parameters to a specified type `U`
pub fn load<'de, U: serde::Deserialize<'de>>(
&'de self,
) -> Result<U, de::value::Error> {
pub fn load<'de, U: serde::Deserialize<'de>>(&'de self) -> Result<U, de::value::Error> {
de::Deserialize::deserialize(PathDeserializer::new(self))
}
}