File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 5757//! assert_eq!(q2.compare(&key), Ordering::Less);
5858//! assert_eq!(q3.compare(&key), Ordering::Greater);
5959//!
60- //! // You cannot do this with the `RangeBounds::contains` method.
60+ //! // You cannot use `Comparable` with the `RangeBounds::contains` method:
6161//! // assert!((q1..q3).contains(key));
62- //! // But you can do this with the `ComparableRangeBounds::compare_contains` method.
62+ //!
63+ //! // But you can use the `ComparableRangeBounds::compare_contains` method:
6364//! assert!((q1..q3).compare_contains(&key));
6465//! }
6566//! ```
@@ -143,9 +144,9 @@ pub trait ComparableRangeBounds<Q: ?Sized>: RangeBounds<Q> {
143144 }
144145}
145146
146- impl < R , T > ComparableRangeBounds < T > for R
147+ impl < R , Q > ComparableRangeBounds < Q > for R
147148where
148- R : ?Sized + RangeBounds < T > ,
149- T : ?Sized ,
149+ R : ?Sized + RangeBounds < Q > ,
150+ Q : ?Sized ,
150151{
151152}
You can’t perform that action at this time.
0 commit comments