projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eea19de
)
Make clippy shut up about `PartialOrd` and `Ord` both impl'd
2023-10-make-clippy-shut-up
author
Matt Corallo
<git@bluematt.me>
Thu, 5 Oct 2023 23:57:08 +0000
(23:57 +0000)
committer
Matt Corallo
<git@bluematt.me>
Fri, 6 Oct 2023 00:02:45 +0000
(
00:02
+0000)
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.
lightning-invoice/src/lib.rs
patch
|
blob
|
history
diff --git
a/lightning-invoice/src/lib.rs
b/lightning-invoice/src/lib.rs
index 9695d79036ecc6a776e9ab10e340f0a94a7463d1..d953795cf8e061157f1c69e9c5bc5eae2b743ca6 100644
(file)
--- 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<Ordering> {
-
self.0.serialize_compact().1.partial_cmp(&other.0.serialize_compact().1
)
+
Some(self.cmp(other)
)
}
}