mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 23:08:36 +01:00
Derive a PartialEq and Eq for PaymentError
This lets users compare error types more easily without needing a match statement.
This commit is contained in:
parent
498f233145
commit
3003f7d719
2 changed files with 2 additions and 2 deletions
|
@ -169,7 +169,7 @@ fn expiry_time_from_unix_epoch(invoice: &Invoice) -> Duration {
|
|||
}
|
||||
|
||||
/// An error that may occur when making a payment.
|
||||
#[derive(Clone, Debug)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub enum PaymentError {
|
||||
/// An error resulting from the provided [`Invoice`] or payment hash.
|
||||
Invoice(&'static str),
|
||||
|
|
|
@ -312,7 +312,7 @@ impl<T: Time> Display for PaymentAttemptsUsingTime<T> {
|
|||
/// [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
|
||||
/// [`Event::PaymentPathFailed`]: crate::events::Event::PaymentPathFailed
|
||||
/// [`Event::PaymentFailed`]: crate::events::Event::PaymentFailed
|
||||
#[derive(Clone, Debug)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub enum RetryableSendFailure {
|
||||
/// The provided [`PaymentParameters::expiry_time`] indicated that the payment has expired. Note
|
||||
/// that this error is *not* caused by [`Retry::Timeout`].
|
||||
|
|
Loading…
Add table
Reference in a new issue