Skip to content

Commit

Permalink
Fix clippy warnings + errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alancai98 committed Oct 24, 2023
1 parent f5ba355 commit 6579cb5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
17 changes: 1 addition & 16 deletions partiql-value/src/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,22 +183,7 @@ impl PartialEq for List {

impl PartialOrd for List {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
let mut l = self.0.iter();
let mut r = other.0.iter();

loop {
match (l.next(), r.next()) {
(None, None) => return Some(Ordering::Equal),
(Some(_), None) => return Some(Ordering::Greater),
(None, Some(_)) => return Some(Ordering::Less),
(Some(lv), Some(rv)) => match lv.partial_cmp(rv) {
None => return None,
Some(Ordering::Less) => return Some(Ordering::Less),
Some(Ordering::Greater) => return Some(Ordering::Greater),
Some(Ordering::Equal) => continue,
},
}
}
Some(self.cmp(other))
}
}

Expand Down
4 changes: 2 additions & 2 deletions partiql/benches/bench_agg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ fn create_tests() -> Vec<(String, String)> {

let aggs_all = aggs
.into_iter()
.cartesian_product([false].into_iter())
.cartesian_product([false])
.collect_vec();
let aggs_distinct = aggs
.into_iter()
.cartesian_product([true].into_iter())
.cartesian_product([true])
.collect_vec();

let full_aggs_all = groups
Expand Down

0 comments on commit 6579cb5

Please sign in to comment.