feat(impls): Allow options to be deserialized from units

This commit is contained in:
Erick Tryzelaar 2016-01-23 16:07:50 -08:00
parent da4e37d3f5
commit 0a32cea26e

View File

@ -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,