Skip to content

Commit 3a097ff

Browse files
committed
Deserialize Bound::Unbounded as unit variant
1 parent 8463bfc commit 3a097ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

serde/src/de/impls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2365,7 +2365,7 @@ where
23652365
A: EnumAccess<'de>,
23662366
{
23672367
match try!(data.variant()) {
2368-
(Field::Unbounded, v) => v.newtype_variant().map(|_: T| Bound::Unbounded),
2368+
(Field::Unbounded, v) => v.unit_variant().map(|()| Bound::Unbounded),
23692369
(Field::Included, v) => v.newtype_variant().map(Bound::Included),
23702370
(Field::Excluded, v) => v.newtype_variant().map(Bound::Excluded),
23712371
}

0 commit comments

Comments
 (0)