mirror of
https://github.com/serde-rs/serde.git
synced 2025-10-02 07:21:12 +00:00
Fix deserialize_with
in module with Result alias
Result<T, E> aliases usually provide one or both of `T` and `E`. This would cause an error when using deserialize_with: error: wrong number of type arguments: expected 1, found 2 which unhelpfully just pointed to `#[derive(Deserialize)]`
This commit is contained in:
parent
95c5e8681e
commit
4af850431c
@ -619,7 +619,7 @@ fn wrap_deserialize_with(cx: &ExtCtxt,
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl $generics ::serde::de::Deserialize for $ty_path $where_clause {
|
impl $generics ::serde::de::Deserialize for $ty_path $where_clause {
|
||||||
fn deserialize<D>(deserializer: &mut D) -> Result<Self, D::Error>
|
fn deserialize<D>(deserializer: &mut D) -> ::std::result::Result<Self, D::Error>
|
||||||
where D: ::serde::de::Deserializer
|
where D: ::serde::de::Deserializer
|
||||||
{
|
{
|
||||||
let value = try!($path(deserializer));
|
let value = try!($path(deserializer));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user