Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
grandizzy committed Feb 15, 2024
1 parent f4e9113 commit b8f8c01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/cast/bin/cmd/wallet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ flag to set your key via:

// List all files in keystore directory
let keystore_files: Result<Vec<_>, eyre::Report> =
std::fs::read_dir(&keystore_dir)
std::fs::read_dir(keystore_dir)
.wrap_err("Failed to read the directory")?
.filter_map(|entry| match entry {
Ok(entry) => {
Expand Down
5 changes: 2 additions & 3 deletions crates/cast/tests/cli/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ casttest!(wallet_sign_typed_data_file, |_prj, cmd| {
// tests that `cast wallet list` outputs the local accounts
casttest!(wallet_list_local_accounts, |prj, cmd| {
let keystore_path = prj.root().join("keystore");
fs::create_dir_all(&keystore_path).unwrap();
// create new wallet
fs::create_dir_all(keystore_path).unwrap();
cmd.set_current_dir(prj.root());

// empty results
Expand All @@ -150,7 +149,7 @@ casttest!(wallet_list_local_accounts, |prj, cmd| {
// test list new wallet
cmd.cast_fuse().args(["wallet", "list", "--dir", "keystore"]);
let list_output = cmd.stdout_lossy();
assert_eq!(list_output.matches("\n").count(), 10);
assert_eq!(list_output.matches('\n').count(), 10);
});

// tests that `cast wallet list --aws` attempt to use AWS KMS keys
Expand Down

0 comments on commit b8f8c01

Please sign in to comment.