Add Tuple Deserializer Visitor constructor
This commit is contained in:
parent
1751155a3a
commit
b3cf9375d4
@ -571,6 +571,15 @@ macro_rules! tuple_impls {
|
||||
marker: PhantomData<($($name,)+)>,
|
||||
}
|
||||
|
||||
impl<
|
||||
$($name: Deserialize,)+
|
||||
> $visitor<$($name,)+> {
|
||||
fn new() -> Self {
|
||||
$visitor { marker: PhantomData }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
impl<
|
||||
$($name: Deserialize,)+
|
||||
> Visitor for $visitor<$($name,)+> {
|
||||
@ -601,7 +610,7 @@ macro_rules! tuple_impls {
|
||||
fn deserialize<D>(deserializer: &mut D) -> Result<($($name,)+), D::Error>
|
||||
where D: Deserializer,
|
||||
{
|
||||
deserializer.visit_tuple($visitor { marker: PhantomData })
|
||||
deserializer.visit_tuple($visitor::new())
|
||||
}
|
||||
}
|
||||
)+
|
||||
|
Loading…
x
Reference in New Issue
Block a user