X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Foutbound_payment.rs;h=86b4de768f830172d1caf411b5670667be60923e;hb=4d2679fac656a3d828877f3f31aad6cff4ada9c8;hp=33ccecb4ca858b17c45321b3a17c2303e6931587;hpb=8311581fe110a9ee561a6fda6b55c78a02068d43;p=rust-lightning diff --git a/lightning/src/ln/outbound_payment.rs b/lightning/src/ln/outbound_payment.rs index 33ccecb4..86b4de76 100644 --- a/lightning/src/ln/outbound_payment.rs +++ b/lightning/src/ln/outbound_payment.rs @@ -276,7 +276,11 @@ pub(crate) struct PaymentAttemptsUsingTime { /// it means the result of the first attempt is not known yet. pub(crate) count: usize, /// This field is only used when retry is `Retry::Timeout` which is only build with feature std - first_attempted_at: T + #[cfg(not(feature = "no-std"))] + first_attempted_at: T, + #[cfg(feature = "no-std")] + phantom: core::marker::PhantomData, + } #[cfg(not(any(feature = "no-std", test)))] @@ -290,7 +294,10 @@ impl PaymentAttemptsUsingTime { pub(crate) fn new() -> Self { PaymentAttemptsUsingTime { count: 0, - first_attempted_at: T::now() + #[cfg(not(feature = "no-std"))] + first_attempted_at: T::now(), + #[cfg(feature = "no-std")] + phantom: core::marker::PhantomData, } } }