From: Matt Corallo Date: Thu, 5 Oct 2023 23:57:08 +0000 (+0000) Subject: Make clippy shut up about `PartialOrd` and `Ord` both impl'd X-Git-Tag: v0.0.118~21^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=refs%2Fheads%2F2023-10-make-clippy-shut-up;p=rust-lightning Make clippy shut up about `PartialOrd` and `Ord` both impl'd Clippy gets mad that we have an implementation of `ParialOrd` and `Ord` separately, even though both are identical. Making `ParitalOrd` call `Ord` makes clippy shut up. --- diff --git a/lightning-invoice/src/lib.rs b/lightning-invoice/src/lib.rs index 9695d7903..d953795cf 100644 --- a/lightning-invoice/src/lib.rs +++ b/lightning-invoice/src/lib.rs @@ -504,7 +504,7 @@ pub struct Bolt11InvoiceSignature(pub RecoverableSignature); impl PartialOrd for Bolt11InvoiceSignature { fn partial_cmp(&self, other: &Self) -> Option { - self.0.serialize_compact().1.partial_cmp(&other.0.serialize_compact().1) + Some(self.cmp(other)) } }