File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 57
57
//! assert_eq!(q2.compare(&key), Ordering::Less);
58
58
//! assert_eq!(q3.compare(&key), Ordering::Greater);
59
59
//!
60
- //! // You cannot do this with the `RangeBounds::contains` method.
61
- //! // assert!((q1..q3).contains(key));
62
- //! // But you can do this with the `ComparableRangeBounds::compare_contains` method.
60
+ //! // You cannot use `Comparable` with the `RangeBounds::contains` method:
61
+ //! // assert!((q1..q3).contains(&key));
62
+ //!
63
+ //! // But you can use the `ComparableRangeBounds::compare_contains` method:
63
64
//! assert!((q1..q3).compare_contains(&key));
64
65
//! }
65
66
//! ```
@@ -143,9 +144,9 @@ pub trait ComparableRangeBounds<Q: ?Sized>: RangeBounds<Q> {
143
144
}
144
145
}
145
146
146
- impl < R , T > ComparableRangeBounds < T > for R
147
+ impl < R , Q > ComparableRangeBounds < Q > for R
147
148
where
148
- R : ?Sized + RangeBounds < T > ,
149
- T : ?Sized ,
149
+ R : ?Sized + RangeBounds < Q > ,
150
+ Q : ?Sized ,
150
151
{
151
152
}
You can’t perform that action at this time.
0 commit comments