pub fn new(lower: Option<RangeBound<LowerBound, T>>, upper: Option<RangeBound<UpperBound, T>>) -> Range<T> {
        let lower = lower.map(Normalizable::normalize);
        let upper = upper.map(Normalizable::normalize);

        if let (&Some(ref lower), &Some(ref upper)) = (&lower, &upper) {
            let empty = match (lower.type_, upper.type_) {
                (Inclusive, Inclusive) => lower.value > upper.value,
                _ => lower.value >= upper.value,
            };
            if empty {
                return Range { inner: Empty };
            }
        }

        Range {
            inner: Normal(lower, upper),
        }
    }
/// Creates a new range.
///
/// If a bound is `None`, the range is unbounded in that direction.
Creates a new range.
If a bound is `None`, the range is unbounded in that direction.
Creates a new range . If a bound is ` None ` the range is unbounded in that direction .
pub fn new(lower: Option<RangeBound<LowerBound, T>>, upper: Option<RangeBound<UpperBound, T>>) -> Range<T> {
        let lower = lower.map(Normalizable::normalize);
        let upper = upper.map(Normalizable::normalize);
        if let (&Some(ref lower), &Some(ref upper)) = (&lower, &upper) {
            let empty = match (lower.type_, upper.type_) {
                (Inclusive, Inclusive) => lower.value > upper.value,
                _ => lower.value >= upper.value,
            };
            if empty {
                return Range { inner: Empty };
            }
        }
        Range {
            inner: Normal(lower, upper),
        }
    }
pub fn new ( lower : Option < RangeBound < LowerBound , T > > , upper : Option < RangeBound < UpperBound , T > > ) -> Range < T > { let lower = lower . map ( Normalizable :: normalize ) ; let upper = upper . map ( Normalizable :: normalize ) ; if let ( & Some ( ref lower ) , & Some ( ref upper ) ) = ( & lower , & upper ) { let empty = match ( lower . type_ , upper . type_ ) { ( Inclusive , Inclusive ) => lower . value > upper . value , _ => lower . value >= upper . value , } ; if empty { return Range { inner : Empty } ; } } Range { inner : Normal ( lower , upper ) , } }
Creates a new range.
Creates a new range .
lower
Option<RangeBound<LowerBound, T>>
upper
Option<RangeBound<UpperBound, T>>
lower
Option<RangeBound<LowerBound, T>>
upper
Option<RangeBound<UpperBound, T>>