We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4fa7031 commit 61de210Copy full SHA for 61de210
1 file changed
types/range.rs
@@ -57,12 +57,12 @@ macro_rules! bounded_normalizable(
57
impl Normalizable for $t {
58
fn normalize<S: BoundSided>(bound: RangeBound<S, $t>)
59
-> RangeBound<S, $t> {
60
- match BoundSided::side(None::<S>) {
61
- Upper if bound.type_ == Inclusive => {
+ match (BoundSided::side(None::<S>), bound.type_) {
+ (Upper, Inclusive) => {
62
assert!(bound.value != Bounded::max_value());
63
RangeBound::new(bound.value + 1, Exclusive)
64
}
65
- Lower if bound.type_ == Exclusive => {
+ (Lower, Exclusive) => {
66
67
RangeBound::new(bound.value + 1, Inclusive)
68
0 commit comments