Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
elizabethengelman committed Jan 14, 2025
1 parent 9601f22 commit c1423c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/soroban-cli/src/commands/keys/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl Cmd {

fn read_secret(&self, print: &Print) -> Result<Secret, Error> {
if let Ok(secret_key) = std::env::var("SOROBAN_SECRET_KEY") {
return Ok(Secret::SecretKey { secret_key });
Ok(Secret::SecretKey { secret_key })
} else if self.secrets.secure_store {
let prompt = "Type a 12 or 24 word seed phrase:";
let secret_key = read_password(print, prompt)?;
Expand Down
7 changes: 4 additions & 3 deletions cmd/soroban-cli/src/signer/secure_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub fn save_secret(
write_to_secure_store(entry_name, seed_phrase, print)?;
}

return Ok(secret);
Ok(secret)
}

fn write_to_secure_store(
Expand All @@ -58,7 +58,7 @@ fn write_to_secure_store(
) -> Result<(), Error> {
print.infoln(format!("Writing to secure store: {entry_name}"));
let entry = StellarEntry::new(entry_name)?;
Ok(if let Ok(key) = entry.get_public_key(None) {
if let Ok(key) = entry.get_public_key(None) {
print.warnln(format!(
"A key for {entry_name} already exists in your operating system's secure store: {key}"
));
Expand All @@ -67,5 +67,6 @@ fn write_to_secure_store(
"Saving a new key to your operating system's secure store: {entry_name}"
));
entry.set_seed_phrase(seed_phrase)?;
})
};
Ok(())
}

0 comments on commit c1423c3

Please sign in to comment.