We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 818dbdf commit aadd000Copy full SHA for aadd000
lightning-invoice/src/lib.rs
@@ -253,6 +253,18 @@ pub struct Invoice {
253
signed_invoice: SignedRawInvoice,
254
}
255
256
+impl PartialOrd for Invoice {
257
+ fn partial_cmp(&self, other: &Self) -> Option<core::cmp::Ordering> {
258
+ self.to_string().partial_cmp(&other.to_string())
259
+ }
260
+}
261
+
262
+impl Ord for Invoice {
263
+ fn cmp(&self, other: &Self) -> core::cmp::Ordering {
264
+ self.to_string().cmp(&other.to_string())
265
266
267
268
/// Represents the description of an invoice which has to be either a directly included string or
269
/// a hash of a description provided out of band.
270
///
0 commit comments