Update for API changes
This commit is contained in:
parent
71762c6e67
commit
413cdde760
@ -104,11 +104,11 @@ macro_rules! bounded_normalizable(
|
|||||||
-> RangeBound<S, $t> {
|
-> RangeBound<S, $t> {
|
||||||
match (BoundSided::side(None::<S>), bound.type_) {
|
match (BoundSided::side(None::<S>), bound.type_) {
|
||||||
(Upper, Inclusive) => {
|
(Upper, Inclusive) => {
|
||||||
assert!(bound.value != $t::max_value);
|
assert!(bound.value != $t::MAX);
|
||||||
RangeBound::new(bound.value + 1, Exclusive)
|
RangeBound::new(bound.value + 1, Exclusive)
|
||||||
}
|
}
|
||||||
(Lower, Exclusive) => {
|
(Lower, Exclusive) => {
|
||||||
assert!(bound.value != $t::max_value);
|
assert!(bound.value != $t::MAX);
|
||||||
RangeBound::new(bound.value + 1, Inclusive)
|
RangeBound::new(bound.value + 1, Inclusive)
|
||||||
}
|
}
|
||||||
_ => bound
|
_ => bound
|
||||||
@ -411,17 +411,17 @@ mod test {
|
|||||||
let r = range!('(', 3i32 ']');
|
let r = range!('(', 3i32 ']');
|
||||||
assert!(!r.contains(&4));
|
assert!(!r.contains(&4));
|
||||||
assert!(r.contains(&2));
|
assert!(r.contains(&2));
|
||||||
assert!(r.contains(&i32::min_value));
|
assert!(r.contains(&i32::MIN));
|
||||||
|
|
||||||
let r = range!('[' 1i32, ')');
|
let r = range!('[' 1i32, ')');
|
||||||
assert!(r.contains(&i32::max_value));
|
assert!(r.contains(&i32::MAX));
|
||||||
assert!(r.contains(&4));
|
assert!(r.contains(&4));
|
||||||
assert!(!r.contains(&0));
|
assert!(!r.contains(&0));
|
||||||
|
|
||||||
let r = range!('(', ')');
|
let r = range!('(', ')');
|
||||||
assert!(r.contains(&i32::max_value));
|
assert!(r.contains(&i32::MAX));
|
||||||
assert!(r.contains(&0i32));
|
assert!(r.contains(&0i32));
|
||||||
assert!(r.contains(&i32::min_value));
|
assert!(r.contains(&i32::MIN));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
Loading…
Reference in New Issue
Block a user