Format HashMap::insert call
[rust-lightning] / lightning / src / ln / channelmanager.rs
index d2b7166a5038ee9c493b6d3071bea32249db59d2..834f84c4b9bf536e7d061adc2e644a6328f79b34 100644 (file)
@@ -4084,8 +4084,8 @@ where
        pub(crate) fn test_send_payment_along_path(&self, path: &Path, payment_hash: &PaymentHash, recipient_onion: RecipientOnionFields, total_value: u64, cur_height: u32, payment_id: PaymentId, keysend_preimage: &Option<PaymentPreimage>, session_priv_bytes: [u8; 32]) -> Result<(), APIError> {
                let _lck = self.total_consistency_lock.read().unwrap();
                self.send_payment_along_path(SendAlongPathArgs {
-                       path, payment_hash, recipient_onion, total_value, cur_height, payment_id, keysend_preimage,
-                       session_priv_bytes
+                       path, payment_hash, recipient_onion: &recipient_onion, total_value,
+                       cur_height, payment_id, keysend_preimage, session_priv_bytes
                })
        }
 
@@ -6326,10 +6326,16 @@ where
 
                                let htlcs = payment.htlcs.iter().map(events::ClaimedHTLC::from).collect();
                                let sender_intended_value = payment.htlcs.first().map(|htlc| htlc.total_msat);
-                               let dup_purpose = claimable_payments.pending_claiming_payments.insert(payment_hash,
-                                       ClaimingPayment { amount_msat: payment.htlcs.iter().map(|source| source.value).sum(),
-                                       payment_purpose: payment.purpose, receiver_node_id, htlcs, sender_intended_value
-                               });
+                               let dup_purpose = claimable_payments.pending_claiming_payments.insert(
+                                       payment_hash,
+                                       ClaimingPayment {
+                                               amount_msat: payment.htlcs.iter().map(|source| source.value).sum(),
+                                               payment_purpose: payment.purpose,
+                                               receiver_node_id,
+                                               htlcs,
+                                               sender_intended_value,
+                                       },
+                               );
                                if dup_purpose.is_some() {
                                        debug_assert!(false, "Shouldn't get a duplicate pending claim event ever");
                                        log_error!(self.logger, "Got a duplicate pending claimable event on payment hash {}! Please report this bug",
@@ -8563,8 +8569,6 @@ macro_rules! create_offer_builder { ($self: ident, $builder: ty) => {
        ///
        /// Errors if the parameterized [`Router`] is unable to create a blinded path for the offer.
        ///
-       /// This is not exported to bindings users as builder patterns don't map outside of move semantics.
-       ///
        /// [`Offer`]: crate::offers::offer::Offer
        /// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
        pub fn create_offer_builder(&$self) -> Result<$builder, Bolt12SemanticError> {
@@ -8627,8 +8631,6 @@ macro_rules! create_refund_builder { ($self: ident, $builder: ty) => {
        /// - `amount_msats` is invalid, or
        /// - the parameterized [`Router`] is unable to create a blinded path for the refund.
        ///
-       /// This is not exported to bindings users as builder patterns don't map outside of move semantics.
-       ///
        /// [`Refund`]: crate::offers::refund::Refund
        /// [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
        /// [`Bolt12Invoice::payment_paths`]: crate::offers::invoice::Bolt12Invoice::payment_paths