Skip to content

Commit

Permalink
fix: more clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
lambda-0x committed Apr 21, 2024
1 parent 596cc71 commit a8597d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
10 changes: 3 additions & 7 deletions bin/sozo/src/commands/options/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,10 @@ impl SignerOptions {
.or_else(|| env_metadata.and_then(|env| env.keystore_password()))
{
password.to_owned()
} else if no_wait {
return Err(anyhow!("Could not find password. Please specify the password."));
} else {
if no_wait {
return Err(anyhow!(
"Could not find password. Please specify the password."
));
} else {
rpassword::prompt_password("Enter password: ")?
}
rpassword::prompt_password("Enter password: ")?

Check warning on line 63 in bin/sozo/src/commands/options/signer.rs

View check run for this annotation

Codecov / codecov/patch

bin/sozo/src/commands/options/signer.rs#L63

Added line #L63 was not covered by tests
}
};
let private_key = SigningKey::from_keystore(path, &password)?;
Expand Down
5 changes: 3 additions & 2 deletions crates/sozo/ops/src/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ pub async fn new(signer: LocalWallet, force: bool, file: PathBuf) -> Result<()>
Ok(())
}

#[allow(clippy::too_many_arguments)]
pub async fn deploy(
provider: JsonRpcClient<HttpTransport>,
signer: LocalWallet,
Expand Down Expand Up @@ -284,7 +285,7 @@ pub async fn deploy(

if simulate {
simulate_account_deploy(&account_deployment).await?;
return Ok(());
Ok(())

Check warning on line 288 in crates/sozo/ops/src/account.rs

View check run for this annotation

Codecov / codecov/patch

crates/sozo/ops/src/account.rs#L288

Added line #L288 was not covered by tests
} else {
do_account_deploy(
max_fee,
Expand Down Expand Up @@ -398,7 +399,7 @@ async fn simulate_account_deploy(
colored_json::to_colored_json(&simulation_json, ColorMode::Auto(Output::StdOut))?;

println!("{simulation_json}");
return Ok(());
Ok(())

Check warning on line 402 in crates/sozo/ops/src/account.rs

View check run for this annotation

Codecov / codecov/patch

crates/sozo/ops/src/account.rs#L402

Added line #L402 was not covered by tests
}

pub async fn fetch(
Expand Down

0 comments on commit a8597d7

Please sign in to comment.