mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
bin/cashierd: Clippy fixes.
This commit is contained in:
@@ -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()))?;
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user