]> Untitled Git - bdk-cli/commitdiff
Fix clippy warning
authorSteve Myers <steve@notmandatory.org>
Sat, 19 Feb 2022 03:34:20 +0000 (19:34 -0800)
committerSteve Myers <steve@notmandatory.org>
Fri, 6 May 2022 18:28:48 +0000 (11:28 -0700)
src/bdk_cli.rs

index 1e0ee1a3df7fee8de95d686f52510591b8d08ea8..71506668223222f43fe1f7e2d54b51307391c33b 100644 (file)
@@ -91,7 +91,7 @@ enum ReplSubCommand {
 }
 
 /// prepare bdk_cli home and wallet directory
-fn prepare_home_wallet_dir(wallet_name: &String) -> Result<PathBuf, Error> {
+fn prepare_home_wallet_dir(wallet_name: &str) -> Result<PathBuf, Error> {
     let mut dir = PathBuf::new();
     dir.push(
         &dirs_next::home_dir().ok_or_else(|| Error::Generic("home dir not found".to_string()))?,
@@ -114,7 +114,7 @@ fn prepare_home_wallet_dir(wallet_name: &String) -> Result<PathBuf, Error> {
 }
 
 /// Prepare wallet database directory
-fn prepare_wallet_db_dir(wallet_name: &String) -> Result<PathBuf, Error> {
+fn prepare_wallet_db_dir(wallet_name: &str) -> Result<PathBuf, Error> {
     let mut db_dir = prepare_home_wallet_dir(wallet_name)?;
 
     #[cfg(feature = "key-value-db")]
@@ -134,7 +134,7 @@ fn prepare_wallet_db_dir(wallet_name: &String) -> Result<PathBuf, Error> {
 
 /// Prepare blockchain data directory (for compact filters)
 #[cfg(feature = "compact_filters")]
-fn prepare_bc_dir(wallet_name: &String) -> Result<PathBuf, Error> {
+fn prepare_bc_dir(wallet_name: &str) -> Result<PathBuf, Error> {
     let mut bc_dir = prepare_home_wallet_dir(wallet_name)?;
 
     bc_dir.push("compact_filters");