Skip to content

Commit b536d01

Browse files
committed
Implement PartialEq/Eq for Events
1 parent abbd295 commit b536d01

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lightning/src/routing/router.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ impl Readable for Route {
363363
/// [`Event::PaymentPathFailed`] for retrying a failed payment path.
364364
///
365365
/// [`Event::PaymentPathFailed`]: crate::util::events::Event::PaymentPathFailed
366-
#[derive(Clone, Debug)]
366+
#[derive(Clone, Debug, PartialEq, Eq)]
367367
pub struct RouteParameters {
368368
/// The parameters of the failed payment path.
369369
pub payment_params: PaymentParameters,

lightning/src/util/events.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ use crate::sync::Arc;
4646

4747
/// Some information provided on receipt of payment depends on whether the payment received is a
4848
/// spontaneous payment or a "conventional" lightning payment that's paying an invoice.
49-
#[derive(Clone, Debug)]
49+
#[derive(Clone, Debug, PartialEq, Eq)]
5050
pub enum PaymentPurpose {
5151
/// Information for receiving a payment that we generated an invoice for.
5252
InvoicePayment {
@@ -455,7 +455,7 @@ impl_writeable_tlv_based_enum!(InterceptNextHop,
455455
/// Note that while Writeable and Readable are implemented for Event, you probably shouldn't use
456456
/// them directly as they don't round-trip exactly (for example FundingGenerationReady is never
457457
/// written as it makes no sense to respond to it after reconnecting to peers).
458-
#[derive(Clone, Debug)]
458+
#[derive(Clone, Debug, PartialEq, Eq)]
459459
pub enum Event {
460460
/// Used to indicate that the client should generate a funding transaction with the given
461461
/// parameters and then call [`ChannelManager::funding_transaction_generated`].

0 commit comments

Comments
 (0)