mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 06:57:53 +01:00
Swap around generic argument ordering in InvoicePayer for bindings
The bindings generation really should support generic bounds other than Deref::Target in where clauses, but currently does not. To avoid needing to add support during the current release process, we simply swap around the arguments to move them to the first <> instead of the where.
This commit is contained in:
parent
d26469a77a
commit
7d1e1873f3
1 changed files with 3 additions and 6 deletions
|
@ -150,13 +150,12 @@ use std::time::{Duration, SystemTime};
|
|||
/// See [module-level documentation] for details.
|
||||
///
|
||||
/// [module-level documentation]: crate::payment
|
||||
pub struct InvoicePayer<P: Deref, R, S: Deref, L: Deref, E>
|
||||
pub struct InvoicePayer<P: Deref, R, S: Deref, L: Deref, E: EventHandler>
|
||||
where
|
||||
P::Target: Payer,
|
||||
R: for <'a> Router<<<S as Deref>::Target as LockableScore<'a>>::Locked>,
|
||||
S::Target: for <'a> LockableScore<'a>,
|
||||
L::Target: Logger,
|
||||
E: EventHandler,
|
||||
{
|
||||
payer: P,
|
||||
router: R,
|
||||
|
@ -221,13 +220,12 @@ pub enum PaymentError {
|
|||
Sending(PaymentSendFailure),
|
||||
}
|
||||
|
||||
impl<P: Deref, R, S: Deref, L: Deref, E> InvoicePayer<P, R, S, L, E>
|
||||
impl<P: Deref, R, S: Deref, L: Deref, E: EventHandler> InvoicePayer<P, R, S, L, E>
|
||||
where
|
||||
P::Target: Payer,
|
||||
R: for <'a> Router<<<S as Deref>::Target as LockableScore<'a>>::Locked>,
|
||||
S::Target: for <'a> LockableScore<'a>,
|
||||
L::Target: Logger,
|
||||
E: EventHandler,
|
||||
{
|
||||
/// Creates an invoice payer that retries failed payment paths.
|
||||
///
|
||||
|
@ -455,13 +453,12 @@ fn has_expired(params: &RouteParameters) -> bool {
|
|||
} else { false }
|
||||
}
|
||||
|
||||
impl<P: Deref, R, S: Deref, L: Deref, E> EventHandler for InvoicePayer<P, R, S, L, E>
|
||||
impl<P: Deref, R, S: Deref, L: Deref, E: EventHandler> EventHandler for InvoicePayer<P, R, S, L, E>
|
||||
where
|
||||
P::Target: Payer,
|
||||
R: for <'a> Router<<<S as Deref>::Target as LockableScore<'a>>::Locked>,
|
||||
S::Target: for <'a> LockableScore<'a>,
|
||||
L::Target: Logger,
|
||||
E: EventHandler,
|
||||
{
|
||||
fn handle_event(&self, event: &Event) {
|
||||
match event {
|
||||
|
|
Loading…
Add table
Reference in a new issue