]> 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>
Thu, 9 Oct 2025 04:29:04 +0000 (15:29 +1100)
examples/example_cli/src/lib.rs

index db5f31d0f4b617a96459b4aa98d2ff21cc6cdefb..07811c45aac5a509466836f8e4ced6e5fb4169dd 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()));