diff --git a/types/range.rs b/types/range.rs index cae30f82..facb5a00 100644 --- a/types/range.rs +++ b/types/range.rs @@ -57,12 +57,12 @@ macro_rules! bounded_normalizable( impl Normalizable for $t { fn normalize(bound: RangeBound) -> RangeBound { - match BoundSided::side(None::) { - Upper if bound.type_ == Inclusive => { + match (BoundSided::side(None::), bound.type_) { + (Upper, Inclusive) => { assert!(bound.value != Bounded::max_value()); RangeBound::new(bound.value + 1, Exclusive) } - Lower if bound.type_ == Exclusive => { + (Lower, Exclusive) => { assert!(bound.value != Bounded::max_value()); RangeBound::new(bound.value + 1, Inclusive) }