From 31c786a7e9e6c6d4a62cab9cecbe2313167c1504 Mon Sep 17 00:00:00 2001 From: konstin Date: Mon, 11 Mar 2024 21:41:34 +0100 Subject: [PATCH] Fix clippy lints --- src/range.rs | 4 ++-- src/term.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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), } } }