add the is_valid trait default method
This commit is contained in:
parent
354815809b
commit
176c39f58c
@ -1418,6 +1418,13 @@ pub trait InclusiveRange<I> {
|
||||
point >= self.start() && point <= self.end()
|
||||
}
|
||||
|
||||
fn is_valid(&self) -> bool
|
||||
where
|
||||
I: Ord,
|
||||
{
|
||||
self.start() <= self.end()
|
||||
}
|
||||
|
||||
///requires that self comes before other and they don't overlap
|
||||
fn touches_ordered(&self, other: &Self) -> bool
|
||||
where
|
||||
|
Loading…
x
Reference in New Issue
Block a user