bin/cashierd: Clippy fixes.

This commit is contained in:
parazyd
2022-01-13 19:20:05 +01:00
parent a30b6c15dc
commit 18569ee8a5
2 changed files with 3 additions and 4 deletions

View File

@@ -351,7 +351,7 @@ impl BtcClient {
main_keypair = deserialize(&main_keypairs[main_keypairs.len() - 1].secret_key)?;
}
} else {
let keypair_str = load_keypair_to_str(expand_path(&keypair_path)?)?;
let keypair_str = load_keypair_to_str(expand_path(keypair_path)?)?;
let keypair_bytes: Vec<u8> = serde_json::from_str(&keypair_str)?;
main_keypair = Keypair::from_bytes(&keypair_bytes)
.map_err(|e| BtcFailed::DecodeAndEncodeError(e.to_string()))?;

View File

@@ -613,9 +613,8 @@ impl Encodable for SolPubkey {
impl Decodable for SolPubkey {
fn decode<D: std::io::Read>(mut d: D) -> darkfi::Result<Self> {
let key: String = Decodable::decode(&mut d)?;
let key = Pubkey::try_from(key.as_str()).map_err(|_| {
darkfi::Error::DecodeError("SOL BRIDGE: load public key from slice".into())
})?;
let key = Pubkey::try_from(key.as_str())
.map_err(|_| darkfi::Error::DecodeError("SOL BRIDGE: load public key from slice"))?;
Ok(SolPubkey(key))
}
}