feat(impls): Allow options to be deserialized from units
This commit is contained in:
parent
da4e37d3f5
commit
0a32cea26e
@ -283,6 +283,13 @@ impl<
|
||||
> Visitor for OptionVisitor<T> {
|
||||
type Value = Option<T>;
|
||||
|
||||
#[inline]
|
||||
fn visit_unit<E>(&mut self) -> Result<Option<T>, E>
|
||||
where E: Error,
|
||||
{
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn visit_none<E>(&mut self) -> Result<Option<T>, E>
|
||||
where E: Error,
|
||||
|
Loading…
Reference in New Issue
Block a user