Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
konstin committed Mar 12, 2024
1 parent 08830f6 commit 74f61fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ impl<V: Ord> Range<V> {
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
Expand Down Expand Up @@ -518,7 +518,7 @@ impl<V: Ord + Clone> Range<V> {
// 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;
Expand Down
2 changes: 1 addition & 1 deletion src/term.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl<VS: VersionSet> Term<VS> {
(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),
}
}
}
Expand Down

0 comments on commit 74f61fb

Please sign in to comment.