]> Untitled Git - bdk/commitdiff
fix(example_cli): clippy warnings
authorLeonardo Lima <oleonardolima@users.noreply.github.com>
Tue, 23 Sep 2025 00:15:15 +0000 (10:15 +1000)
committerLeonardo Lima <oleonardolima@users.noreply.github.com>
Tue, 23 Sep 2025 00:15:15 +0000 (10:15 +1000)
examples/example_cli/src/lib.rs

index 96a41802f56d4b15353344b1aa75f569d353ef3a..1d74b7b71bf852b17fd963e136fff6bae7684731 100644 (file)
@@ -229,7 +229,7 @@ impl FromStr for CoinSelectionAlgo {
             "oldest-first" => OldestFirst,
             "newest-first" => NewestFirst,
             "bnb" => BranchAndBound,
-            unknown => bail!("unknown coin selection algorithm '{}'", unknown),
+            unknown => bail!("unknown coin selection algorithm '{unknown}'"),
         })
     }
 }
@@ -715,8 +715,8 @@ pub fn handle_commands<CS: clap::Subcommand, S: clap::Args>(
                     _ => unimplemented!("multi xkey signer"),
                 };
 
-                let _ = sign_res
-                    .map_err(|errors| anyhow::anyhow!("failed to sign PSBT {:?}", errors))?;
+                let _ =
+                    sign_res.map_err(|errors| anyhow::anyhow!("failed to sign PSBT {errors:?}"))?;
 
                 let mut obj = serde_json::Map::new();
                 obj.insert("psbt".to_string(), json!(psbt.to_string()));