Skip to content

Commit a91ac16

Browse files
authored
refactor(cast): remove redundant clone and duplicate import (#12430)
* refactor(cast): remove redundant clone and duplicate import * cargo fmt * refactor(cast): avoid unnecessary clone in list_local_senders * Update lib.rs
1 parent c46567b commit a91ac16

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

crates/cast/src/cmd/wallet/list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl ListArgs {
101101
}
102102

103103
fn list_local_senders(&self) -> Result<()> {
104-
let keystore_path = self.dir.clone().unwrap_or_default();
104+
let keystore_path = self.dir.as_deref().unwrap_or_default();
105105
let keystore_dir = if keystore_path.is_empty() {
106106
// Create the keystore default directory if it doesn't exist
107107
let default_dir = Config::foundry_keystores_dir().unwrap();

crates/cast/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use eyre::{Context, ContextCompat, OptionExt, Result};
2727
use foundry_block_explorers::Client;
2828
use foundry_common::{
2929
TransactionReceiptWithRevertReason,
30-
abi::{coerce_value, encode_function_args, get_event, get_func},
30+
abi::{coerce_value, encode_function_args, encode_function_args_packed, get_event, get_func},
3131
compile::etherscan_project,
3232
flatten,
3333
fmt::*,
@@ -49,7 +49,6 @@ use std::{
4949
};
5050
use tokio::signal::ctrl_c;
5151

52-
use foundry_common::abi::encode_function_args_packed;
5352
pub use foundry_evm::*;
5453

5554
pub mod args;

0 commit comments

Comments
 (0)