Bump clippy, fix warnings (#1939)

* Bumping clippy

* Fixing warnings
This commit is contained in:
Tomasz Drwięga
2016-08-17 16:06:41 +02:00
committed by Gav Wood
parent e2cf8a894f
commit bcf6b0b7d8
22 changed files with 47 additions and 43 deletions

View File

@@ -390,7 +390,7 @@ impl Configuration {
fn extra_data(&self) -> Result<Bytes, String> {
match self.args.flag_extradata.as_ref().or(self.args.flag_extra_data.as_ref()) {
Some(ref x) if x.len() <= 32 => Ok(x.as_bytes().to_owned()),
Some(x) if x.len() <= 32 => Ok(x.as_bytes().to_owned()),
None => Ok(version_data()),
Some(_) => Err("Extra data must be at most 32 characters".into()),
}

View File

@@ -38,6 +38,6 @@ pub fn execute(cmd: ImportWallet) -> Result<String, String> {
let acc_provider = AccountProvider::new(secret_store);
let wallet = try!(PresaleWallet::open(cmd.wallet_path).map_err(|_| "Unable to open presale wallet."));
let kp = try!(wallet.decrypt(&password).map_err(|_| "Invalid password."));
let address = acc_provider.insert_account(kp.secret().clone(), &password).unwrap();
let address = acc_provider.insert_account(*kp.secret(), &password).unwrap();
Ok(format!("{:?}", address))
}