Skip to content

Commit

Permalink
Deserialize Bound::Unbounded as unit variant
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Feb 2, 2019
1 parent 8463bfc commit 3a097ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion serde/src/de/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2365,7 +2365,7 @@ where
A: EnumAccess<'de>,
{
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::Excluded, v) => v.newtype_variant().map(Bound::Excluded),
}
Expand Down

0 comments on commit 3a097ff

Please sign in to comment.