pub fn intersect(&self, other: &Range<T>) -> Range<T> {
        if self.is_empty() || other.is_empty() {
            return Range::empty();
        }

        let (_, OptBound(lower)) = order(OptBound(self.lower()), OptBound(other.lower()));
        let (OptBound(upper), _) = order(OptBound(self.upper()), OptBound(other.upper()));

        Range::new(lower.cloned(), upper.cloned())
    }
/// Returns the intersection of this range with another.
Returns the intersection of this range with another.
Returns the intersection of this range with another .
pub fn intersect(&self, other: &Range<T>) -> Range<T> {
        if self.is_empty() || other.is_empty() {
            return Range::empty();
        }
        let (_, OptBound(lower)) = order(OptBound(self.lower()), OptBound(other.lower()));
        let (OptBound(upper), _) = order(OptBound(self.upper()), OptBound(other.upper()));
        Range::new(lower.cloned(), upper.cloned())
    }
pub fn intersect ( & self , other : & Range < T > ) -> Range < T > { if self . is_empty ( ) || other . is_empty ( ) { return Range :: empty ( ) ; } let ( _ , OptBound ( lower ) ) = order ( OptBound ( self . lower ( ) ) , OptBound ( other . lower ( ) ) ) ; let ( OptBound ( upper ) , _ ) = order ( OptBound ( self . upper ( ) ) , OptBound ( other . upper ( ) ) ) ; Range :: new ( lower . cloned ( ) , upper . cloned ( ) ) }
Returns the intersection of this range with another.
Returns the intersection of this range with another .
&self
other
&Range<T>
&self
other
&Range<T>