From: Chris Mikkelson Date: Sun, 28 Apr 2024 20:57:27 +0000 (-0500) Subject: cargo-clippy fixes X-Git-Url: https://git.mikk.net/?a=commitdiff_plain;h=ca38edeb537746d1ff4dc0b1f3e5386c826fa54e;p=mtbl-rs cargo-clippy fixes Remove redudant Some(foo()?). Make PartialOrd more canonical. --- diff --git a/src/seekable/merge.rs b/src/seekable/merge.rs index 1e182e3..fb9860a 100644 --- a/src/seekable/merge.rs +++ b/src/seekable/merge.rs @@ -32,9 +32,7 @@ impl PartialEq for MergerEnt { // boilerplate. impl PartialOrd for MergerEnt { fn partial_cmp(&self, other: &Self) -> Option { - let sent = self.cur_item.borrow(); - let oent = other.cur_item.borrow(); - oent.0.partial_cmp(&sent.0) + Some(self.cmp(other)) } } @@ -68,7 +66,7 @@ where active: BinaryHeap::from( sources .into_iter() - .filter_map(|i| Some(MergerEnt::new(i)?)) + .filter_map(|i| MergerEnt::new(i)) .collect::>>(), ), ended: Vec::new(),