Skip to content

Commit 61de210

Browse files
committed
Remove more pattern guards
1 parent 4fa7031 commit 61de210

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

types/range.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ macro_rules! bounded_normalizable(
5757
impl Normalizable for $t {
5858
fn normalize<S: BoundSided>(bound: RangeBound<S, $t>)
5959
-> RangeBound<S, $t> {
60-
match BoundSided::side(None::<S>) {
61-
Upper if bound.type_ == Inclusive => {
60+
match (BoundSided::side(None::<S>), bound.type_) {
61+
(Upper, Inclusive) => {
6262
assert!(bound.value != Bounded::max_value());
6363
RangeBound::new(bound.value + 1, Exclusive)
6464
}
65-
Lower if bound.type_ == Exclusive => {
65+
(Lower, Exclusive) => {
6666
assert!(bound.value != Bounded::max_value());
6767
RangeBound::new(bound.value + 1, Inclusive)
6868
}

0 commit comments

Comments
 (0)