diff --git a/src/range.rs b/src/range.rs index ee98bb92..7dae26c0 100644 --- a/src/range.rs +++ b/src/range.rs @@ -319,7 +319,7 @@ impl Range { assert!(end_before_start_with_gap(&p[0].1, &p[1].0)); } for (s, e) in self.segments.iter() { - assert!(valid_segment(&s, &e)); + assert!(valid_segment(s, e)); } } self @@ -536,7 +536,7 @@ impl Range { // But, we already know that the segments in our input are valid. // So we do not need to check if the `start` from the input `end` came from is smaller then `end`. // If the `other_start` is larger than end, then the intersection will be invalid. - if !valid_segment(&other_start, &end) { + if !valid_segment(other_start, end) { // Note: We can call `this_iter.next_if(!valid_segment(other_start, this_end))` in a loop. // But the checks make it slower for the benchmarked inputs. continue; diff --git a/src/term.rs b/src/term.rs index a77f62a4..31ffc298 100644 --- a/src/term.rs +++ b/src/term.rs @@ -144,7 +144,7 @@ impl Term { (Self::Positive(r1), Self::Positive(r2)) => r1.subset_of(r2), (Self::Positive(r1), Self::Negative(r2)) => r1.subset_of(&r2.complement()), (Self::Negative(_), Self::Positive(_)) => false, - (Self::Negative(r1), Self::Negative(r2)) => r2.subset_of(&r1), + (Self::Negative(r1), Self::Negative(r2)) => r2.subset_of(r1), } } }