fn less_or_equal(&self, other: &Bound) -> bool {
        // It's defined on Bound and not UnaffectedRange
        // so that it could be used on bounds from different ranges.
        let start = self;
        let end = other;
        // This appears to be a false positive in Clippy:
        // https://github.com/rust-lang/rust-clippy/issues/7383
        #[allow(clippy::if_same_then_else)]
        if start == &Bound::Unbounded || end == &Bound::Unbounded {
            true
        } else if start.version().unwrap() < end.version().unwrap() {
            true
        } else {
            match (&start, &end) {
                (Bound::Inclusive(v_start), Bound::Inclusive(v_end)) => v_start == v_end,
                (_, _) => false,
            }
        }
    }
/// The handling of `Bound::Unbounded` in this function assumes that
/// the first bound is start of a range, and the other bound is the end of a range.
/// **Make sure** this is the way you call it.
/// This is also why we don't define PartialOrd.
The handling of `Bound::Unbounded` in this function assumes that
the first bound is start of a range, and the other bound is the end of a range.
Make sure** this is the way you call it.
This is also why we don't define PartialOrd.
The handling of ` Bound :: Unbounded ` in this function assumes that the first bound is start of a range and the other bound is the end of a range . Make sure ** this is the way you call it . This is also why we don ' t define PartialOrd .
fn less_or_equal(&self, other: &Bound) -> bool {
        // It's defined on Bound and not UnaffectedRange
        // so that it could be used on bounds from different ranges.
        let start = self;
        let end = other;
        // This appears to be a false positive in Clippy:
        // https://github.com/rust-lang/rust-clippy/issues/7383
        #[allow(clippy::if_same_then_else)]
        if start == &Bound::Unbounded || end == &Bound::Unbounded {
            true
        } else if start.version().unwrap() < end.version().unwrap() {
            true
        } else {
            match (&start, &end) {
                (Bound::Inclusive(v_start), Bound::Inclusive(v_end)) => v_start == v_end,
                (_, _) => false,
            }
        }
    }
fn less_or_equal ( & self , other : & Bound ) -> bool { // It's defined on Bound and not UnaffectedRange // so that it could be used on bounds from different ranges. let start = self ; let end = other ; // This appears to be a false positive in Clippy: // https://github.com/rust-lang/rust-clippy/issues/7383 # [ allow ( clippy if_same_then_else ) ] if start == & Bound :: Unbounded || end == & Bound :: Unbounded { true } else if start . version ( ) . unwrap ( ) < end . version ( ) . unwrap ( ) { true } else { match ( & start , & end ) { ( Bound :: Inclusive ( v_start ) , Bound :: Inclusive ( v_end ) ) => v_start == v_end , ( _ , _ ) => false , } } }
The handling of `Bound::Unbounded` in this function assumes that
the first bound is start of a range, and the other bound is the end of a range.
The handling of ` Bound :: Unbounded ` in this function assumes that the first bound is start of a range and the other bound is the end of a range .
&self
other
&Bound
&self
other
&Bound