stop using any nightly features (ill miss u const traits)
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
use std::ops::RangeInclusive;
|
||||
|
||||
pub trait IsOverlapping {
|
||||
fn is_overlapping(&self, other: &Self) -> bool;
|
||||
}
|
||||
|
||||
impl IsOverlapping for RangeInclusive<usize> {
|
||||
fn is_overlapping(&self, other: &Self) -> bool {
|
||||
self.contains(other.start()) || self.contains(other.end())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user