More clippy

This commit is contained in:
Michael Vines
2019-10-02 18:33:01 -07:00
parent 9fe8c98047
commit f9f5bc2eb5
21 changed files with 97 additions and 90 deletions

View File

@@ -91,9 +91,10 @@ pub fn parse_args(matches: &ArgMatches<'_>) -> Result<WalletConfig, Box<dyn erro
} else {
let default = WalletConfig::default();
if !std::path::Path::new(&default.keypair_path).exists() {
Err(WalletError::KeypairFileNotFound(
return Err(WalletError::KeypairFileNotFound(
"Generate a new keypair with `solana-keygen new`".to_string(),
))?;
)
.into());
}
default.keypair_path
};