mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-05-09 15:17:56 +00:00
Deserialize Bound::Unbounded as unit variant
This commit is contained in:
@@ -2365,7 +2365,7 @@ where
|
|||||||
A: EnumAccess<'de>,
|
A: EnumAccess<'de>,
|
||||||
{
|
{
|
||||||
match try!(data.variant()) {
|
match try!(data.variant()) {
|
||||||
(Field::Unbounded, v) => v.newtype_variant().map(|_: T| Bound::Unbounded),
|
(Field::Unbounded, v) => v.unit_variant().map(|()| Bound::Unbounded),
|
||||||
(Field::Included, v) => v.newtype_variant().map(Bound::Included),
|
(Field::Included, v) => v.newtype_variant().map(Bound::Included),
|
||||||
(Field::Excluded, v) => v.newtype_variant().map(Bound::Excluded),
|
(Field::Excluded, v) => v.newtype_variant().map(Bound::Excluded),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user