pub fn overlaps(&self, begin: T, end: T) -> bool {
            let overlaps_lt_begin = self
                .intervals
                .range(..begin)
                .last()
                .map_or(false, |(_, e)| *e >= begin);
            let overlaps_ge_begin = self.intervals.range(begin..=end).next().is_some();
            overlaps_lt_begin || overlaps_ge_begin
        }
/// Returns whether the given interval overlaps any previously added
/// interval.
///
/// Both start and end are inclusive.
Returns whether the given interval overlaps any previously added
interval.

Both start and end are inclusive.
Returns whether the given interval overlaps any previously added interval . Both start and end are inclusive .
pub fn overlaps(&self, begin: T, end: T) -> bool {
            let overlaps_lt_begin = self
                .intervals
                .range(..begin)
                .last()
                .map_or(false, |(_, e)| *e >= begin);
            let overlaps_ge_begin = self.intervals.range(begin..=end).next().is_some();
            overlaps_lt_begin || overlaps_ge_begin
        }
pub fn overlaps ( & self , begin : T , end : T ) -> bool { let overlaps_lt_begin = self . intervals . range ( .. begin ) . last ( ) . map_or ( false , | ( _ , e ) | * e >= begin ) ; let overlaps_ge_begin = self . intervals . range ( begin ..= end ) . next ( ) . is_some ( ) ; overlaps_lt_begin || overlaps_ge_begin }
Returns whether the given interval overlaps any previously added
interval.
Returns whether the given interval overlaps any previously added interval .
&self
begin
T
end
T
&self
begin
T
end
T