From 2926bdd336e7906ae0239eae75d81e4702f1deac Mon Sep 17 00:00:00 2001 From: Fmt Bot Date: Sun, 27 Sep 2026 00:07:30 +0000 Subject: [PATCH] 2026-09-27 automated rustfmt nightly --- src/chain/bitcoind.rs | 3 ++- src/io/utils.rs | 3 ++- src/payment/asynchronous/static_invoice_store.rs | 16 +++++++--------- src/types.rs | 3 ++- tests/common/mod.rs | 3 ++- tests/integration_tests_rust.rs | 3 ++- 6 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/chain/bitcoind.rs b/src/chain/bitcoind.rs index 6bfa8ff..ee91bc8 100644 --- a/src/chain/bitcoind.rs +++ b/src/chain/bitcoind.rs @@ -1205,7 +1205,8 @@ impl BlockSource for BitcoindClient { fn get_best_block<'a>( &'a self, - ) -> impl Future), BlockSourceError>> + 'a { + ) -> impl Future), BlockSourceError>> + 'a + { async move { match self { BitcoindClient::Rpc { rpc_client, .. } => rpc_client.get_best_block().await, diff --git a/src/io/utils.rs b/src/io/utils.rs index 771b3e4..734d47d 100644 --- a/src/io/utils.rs +++ b/src/io/utils.rs @@ -85,7 +85,8 @@ pub(crate) fn read_or_generate_seed_file( } #[cfg(unix)] - let mut f = OpenOptions::new().write(true).create_new(true).mode(0o400).open(keys_seed_path)?; + let mut f = + OpenOptions::new().write(true).create_new(true).mode(0o400).open(keys_seed_path)?; #[cfg(not(unix))] let mut f = OpenOptions::new().write(true).create_new(true).open(keys_seed_path)?; diff --git a/src/payment/asynchronous/static_invoice_store.rs b/src/payment/asynchronous/static_invoice_store.rs index f1e2378..20c29a1 100644 --- a/src/payment/asynchronous/static_invoice_store.rs +++ b/src/payment/asynchronous/static_invoice_store.rs @@ -97,15 +97,13 @@ impl StaticInvoiceStore { ) }) }) - .or_else( - |e| { - if e.kind() == lightning::io::ErrorKind::NotFound { - Ok(None) - } else { - Err(e) - } - }, - ) + .or_else(|e| { + if e.kind() == lightning::io::ErrorKind::NotFound { + Ok(None) + } else { + Err(e) + } + }) } pub(crate) async fn handle_persist_static_invoice( diff --git a/src/types.rs b/src/types.rs index 6420943..428e01e 100644 --- a/src/types.rs +++ b/src/types.rs @@ -145,7 +145,8 @@ impl DynStoreTrait for DynStoreWrapper { fn list_async( &self, primary_namespace: &str, secondary_namespace: &str, - ) -> Pin, bitcoin::io::Error>> + Send + 'static>> { + ) -> Pin, bitcoin::io::Error>> + Send + 'static>> + { Box::pin(KVStore::list(&self.0, primary_namespace, secondary_namespace)) } } diff --git a/tests/common/mod.rs b/tests/common/mod.rs index 2b8c316..e95f24c 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -1603,7 +1603,8 @@ pub(crate) async fn do_channel_full_cycle( + invoice_amount_3_msat + determined_amount_msat + keysend_amount_msat) - / 1000 - splice_out_sat; + / 1000 + - splice_out_sat; let node_a_upper_bound_sat = (premine_amount_sat - funding_amount_sat) + (funding_amount_sat - sum_of_all_payments_sat); let node_a_lower_bound_sat = node_a_upper_bound_sat - onchain_fee_buffer_sat; diff --git a/tests/integration_tests_rust.rs b/tests/integration_tests_rust.rs index 3553215..e580f4e 100644 --- a/tests/integration_tests_rust.rs +++ b/tests/integration_tests_rust.rs @@ -1535,7 +1535,8 @@ async fn async_payment() { .filter(|n| { node.network_graph().node(n).map_or(false, |info| info.announcement_info.is_some()) }) - .count() >= 2 + .count() + >= 2 }; // Wait for everyone to see all channels and node announcements.