From 951f27f2024df2aa626e017c53bc1447e601ddcb Mon Sep 17 00:00:00 2001 From: Fmt Bot Date: Sun, 27 Sep 2026 03:28:02 +0000 Subject: [PATCH] 2026-09-27 automated rustfmt nightly --- src/chain/bitcoind.rs | 3 ++- src/data_store.rs | 6 ++++-- src/io/in_memory_store.rs | 3 ++- src/io/postgres_store/mod.rs | 3 ++- src/io/sqlite_store/mod.rs | 3 ++- src/io/utils.rs | 3 ++- src/io/vss_store.rs | 3 ++- src/payment/asynchronous/static_invoice_store.rs | 16 +++++++--------- src/peer_store.rs | 6 ++++-- src/types.rs | 9 ++++++--- src/wallet/persist.rs | 3 ++- tests/common/mod.rs | 3 ++- tests/integration_tests_rust.rs | 3 ++- 13 files changed, 39 insertions(+), 25 deletions(-) diff --git a/src/chain/bitcoind.rs b/src/chain/bitcoind.rs index f7589671b8..ceead66b28 100644 --- a/src/chain/bitcoind.rs +++ b/src/chain/bitcoind.rs @@ -1345,7 +1345,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/data_store.rs b/src/data_store.rs index b1ed816df9..2e78789c38 100644 --- a/src/data_store.rs +++ b/src/data_store.rs @@ -292,7 +292,8 @@ mod tests { impl KVStore for FailingStore { fn read( &self, _primary_namespace: &str, _secondary_namespace: &str, _key: &str, - ) -> impl std::future::Future, io::Error>> + 'static + Send { + ) -> impl std::future::Future, io::Error>> + 'static + Send + { async { Err(io::Error::new(io::ErrorKind::Other, "read failed")) } } @@ -310,7 +311,8 @@ mod tests { fn list( &self, _primary_namespace: &str, _secondary_namespace: &str, - ) -> impl std::future::Future, io::Error>> + 'static + Send { + ) -> impl std::future::Future, io::Error>> + 'static + Send + { async { Err(io::Error::new(io::ErrorKind::Other, "list failed")) } } } diff --git a/src/io/in_memory_store.rs b/src/io/in_memory_store.rs index 156fef3a38..0b917bec5e 100644 --- a/src/io/in_memory_store.rs +++ b/src/io/in_memory_store.rs @@ -214,7 +214,8 @@ impl PaginatedKVStore for InMemoryStore { impl MigratableKVStore for InMemoryStore { fn list_all_keys( &self, - ) -> impl Future, io::Error>> + 'static + Send { + ) -> impl Future, io::Error>> + 'static + Send + { let res = self.list_all_keys_internal(); async move { res } } diff --git a/src/io/postgres_store/mod.rs b/src/io/postgres_store/mod.rs index 90b8cdc391..5081e40e3b 100644 --- a/src/io/postgres_store/mod.rs +++ b/src/io/postgres_store/mod.rs @@ -356,7 +356,8 @@ impl PaginatedKVStore for PostgresStore { impl MigratableKVStore for PostgresStore { fn list_all_keys( &self, - ) -> impl Future, io::Error>> + 'static + Send { + ) -> impl Future, io::Error>> + 'static + Send + { let inner = Arc::clone(&self.inner); let runtime = self.internal_runtime(); async move { diff --git a/src/io/sqlite_store/mod.rs b/src/io/sqlite_store/mod.rs index 2587220598..028a9f249d 100644 --- a/src/io/sqlite_store/mod.rs +++ b/src/io/sqlite_store/mod.rs @@ -207,7 +207,8 @@ impl PaginatedKVStore for SqliteStore { impl MigratableKVStore for SqliteStore { fn list_all_keys( &self, - ) -> impl Future, io::Error>> + 'static + Send { + ) -> impl Future, io::Error>> + 'static + Send + { let inner = Arc::clone(&self.inner); let fut = tokio::task::spawn_blocking(move || inner.list_all_keys_internal()); async move { diff --git a/src/io/utils.rs b/src/io/utils.rs index 4657688f51..bd284e341e 100644 --- a/src/io/utils.rs +++ b/src/io/utils.rs @@ -80,7 +80,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/io/vss_store.rs b/src/io/vss_store.rs index 61d4e7abc2..72f39b1120 100644 --- a/src/io/vss_store.rs +++ b/src/io/vss_store.rs @@ -326,7 +326,8 @@ impl PaginatedKVStore for VssStore { impl MigratableKVStore for VssStore { fn list_all_keys( &self, - ) -> impl Future, io::Error>> + 'static + Send { + ) -> impl Future, io::Error>> + 'static + Send + { let inner = Arc::clone(&self.inner); let runtime = self.internal_runtime(); async move { diff --git a/src/payment/asynchronous/static_invoice_store.rs b/src/payment/asynchronous/static_invoice_store.rs index f1e2378c23..20c29a1b99 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/peer_store.rs b/src/peer_store.rs index 8345bf7111..b43f1ebd60 100644 --- a/src/peer_store.rs +++ b/src/peer_store.rs @@ -186,7 +186,8 @@ mod tests { impl KVStore for FailingStore { fn read( &self, _primary_namespace: &str, _secondary_namespace: &str, _key: &str, - ) -> impl std::future::Future, io::Error>> + 'static + Send { + ) -> impl std::future::Future, io::Error>> + 'static + Send + { async { Err(io::Error::new(io::ErrorKind::Other, "read failed")) } } @@ -204,7 +205,8 @@ mod tests { fn list( &self, _primary_namespace: &str, _secondary_namespace: &str, - ) -> impl std::future::Future, io::Error>> + 'static + Send { + ) -> impl std::future::Future, io::Error>> + 'static + Send + { async { Err(io::Error::new(io::ErrorKind::Other, "list failed")) } } } diff --git a/src/types.rs b/src/types.rs index 22429d980b..5cef80a738 100644 --- a/src/types.rs +++ b/src/types.rs @@ -111,7 +111,8 @@ impl<'a> KVStore for dyn DynStoreTrait + 'a { impl<'a> PaginatedKVStore for dyn DynStoreTrait + 'a { fn list_paginated( &self, primary_namespace: &str, secondary_namespace: &str, page_token: Option, - ) -> impl Future> + Send + 'static { + ) -> impl Future> + Send + 'static + { DynStoreTrait::list_paginated_async( self, primary_namespace, @@ -159,7 +160,8 @@ impl KVStore for DynStoreRef { impl PaginatedKVStore for DynStoreRef { fn list_paginated( &self, primary_namespace: &str, secondary_namespace: &str, page_token: Option, - ) -> impl Future> + Send + 'static { + ) -> impl Future> + Send + 'static + { DynStoreTrait::list_paginated_async( &*self.0, primary_namespace, @@ -192,7 +194,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/src/wallet/persist.rs b/src/wallet/persist.rs index 9d33a09f93..3d74a8d369 100644 --- a/src/wallet/persist.rs +++ b/src/wallet/persist.rs @@ -279,7 +279,8 @@ mod tests { fn list_paginated( &self, primary_namespace: &str, secondary_namespace: &str, page_token: Option, - ) -> impl Future> + 'static + Send { + ) -> impl Future> + 'static + Send + { PaginatedKVStore::list_paginated( &*self.inner, primary_namespace, diff --git a/tests/common/mod.rs b/tests/common/mod.rs index 1fbbaad7e2..1153842292 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -1728,7 +1728,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 2c36c2b159..923f4db50a 100644 --- a/tests/integration_tests_rust.rs +++ b/tests/integration_tests_rust.rs @@ -2648,7 +2648,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.