Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mappum committed Feb 14, 2024
1 parent 0601614 commit 4f7f131
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
5 changes: 2 additions & 3 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,11 +435,10 @@ mod abci {

include_str!("../testnet_addresses.csv")
.lines()
.map(|line| {
.try_for_each(|line| {
let address = line.parse().unwrap();
self.accounts.deposit(address, Coin::mint(10_000_000_000))
})
.collect::<Result<()>>()?;
})?;
}

Ok(())
Expand Down
4 changes: 2 additions & 2 deletions src/bin/nomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1999,7 +1999,7 @@ impl RecoverDepositCmd {
dest
);

return Ok(());
Ok(())
}

async fn run(&self) -> Result<()> {
Expand Down Expand Up @@ -2093,7 +2093,7 @@ impl RecoverDepositCmd {
}
}

let dest = Dest::Address(self.nomic_addr.clone());
let dest = Dest::Address(self.nomic_addr);
let dest_bytes = dest.commitment_bytes().unwrap();

for (sigset_index, sigset) in sigsets.iter() {
Expand Down
4 changes: 2 additions & 2 deletions src/bitcoin/signatory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ impl SignatorySet {
take_op(ins, OP_ENDIF)?;

Ok::<_, Error>(Signatory {
pubkey: pubkey.into(),
pubkey,
voting_power: voting_power as u64,
})
}
Expand All @@ -250,7 +250,7 @@ impl SignatorySet {
take_op(ins, OP_ENDIF)?;

Ok::<_, Error>(Signatory {
pubkey: pubkey.into(),
pubkey,
voting_power: voting_power as u64,
})
}
Expand Down
2 changes: 1 addition & 1 deletion src/bitcoin/threshold_sig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ impl ThresholdSig {

for signatory in signatories.iter() {
ts.sigs.insert(
signatory.pubkey.into(),
signatory.pubkey,
Share {
power: signatory.voting_power,
sig: None,
Expand Down
3 changes: 1 addition & 2 deletions src/cosmos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@ impl Cosmos {
.map_err(|_| OrgaError::App("Invalid public key".to_string()))?
.key
.as_slice(),
)?
.into();
)?;

let mut chain = self.chains.entry(client_id)?.or_default()?;
if let Some(existing_key) = chain.op_keys_by_cons.get(cons_key.clone())? {
Expand Down

0 comments on commit 4f7f131

Please sign in to comment.