]> Untitled Git - bdk/commitdiff
chore(chain,wallet): fix build warnings
authorSteve Myers <steve@notmandatory.org>
Thu, 12 Dec 2024 04:35:04 +0000 (22:35 -0600)
committerSteve Myers <steve@notmandatory.org>
Thu, 12 Dec 2024 15:18:48 +0000 (09:18 -0600)
crates/chain/src/tx_graph.rs
crates/wallet/src/wallet/changeset.rs

index 6659e0352f8125fc2c3a740c2c8016307ab723ab..0207f242e14aad722ad53ead0213dcda5c6f4344 100644 (file)
@@ -460,7 +460,11 @@ impl<A: Clone + Ord> TxGraph<A> {
     ///
     /// The supplied closure returns an `Option<T>`, allowing the caller to map each node it visits
     /// and decide whether to visit descendants.
-    pub fn walk_descendants<'g, F, O>(&'g self, txid: Txid, walk_map: F) -> TxDescendants<A, F, O>
+    pub fn walk_descendants<'g, F, O>(
+        &'g self,
+        txid: Txid,
+        walk_map: F,
+    ) -> TxDescendants<'g, A, F, O>
     where
         F: FnMut(usize, Txid) -> Option<O> + 'g,
     {
@@ -477,7 +481,7 @@ impl<A> TxGraph<A> {
         &'g self,
         tx: &'g Transaction,
         walk_map: F,
-    ) -> TxDescendants<A, F, O>
+    ) -> TxDescendants<'g, A, F, O>
     where
         F: FnMut(usize, Txid) -> Option<O> + 'g,
     {
@@ -495,7 +499,7 @@ impl<A> TxGraph<A> {
     pub fn direct_conflicts<'g>(
         &'g self,
         tx: &'g Transaction,
-    ) -> impl Iterator<Item = (usize, Txid)> + '_ {
+    ) -> impl Iterator<Item = (usize, Txid)> + 'g {
         let txid = tx.compute_txid();
         tx.input
             .iter()
index 36a5b49361058fce4cc84ca5bb9b449b339d0c01..94dba2b7dbff52468e150d48dcdf3842aad1d8e2 100644 (file)
@@ -1,4 +1,3 @@
-use alloc::string::String;
 use bdk_chain::{
     indexed_tx_graph, keychain_txout, local_chain, tx_graph, ConfirmationBlockTime, Merge,
 };
@@ -73,7 +72,7 @@ impl ChangeSet {
     pub const WALLET_TABLE_NAME: &'static str = "bdk_wallet";
 
     /// Get v0 sqlite [ChangeSet] schema
-    pub fn schema_v0() -> String {
+    pub fn schema_v0() -> alloc::string::String {
         format!(
             "CREATE TABLE {} ( \
                 id INTEGER PRIMARY KEY NOT NULL CHECK (id = 0), \