Skip to content

Commit

Permalink
chore(clippy): make clippy happy (#2264)
Browse files Browse the repository at this point in the history
* chore(clippy): make clippy happy

* chore: silence clippy fp

---------

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
  • Loading branch information
mattsse and gakonst committed Mar 15, 2023
1 parent 72be337 commit 304fe09
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions ethers-contract/src/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ where
type IntoFuture = Pin<Box<dyn Future<Output = Self::Output> + Send>>;

fn into_future(self) -> Self::IntoFuture {
#[allow(clippy::redundant_async_block)]
Box::pin(async move { self.call().await })
}
}
2 changes: 1 addition & 1 deletion ethers-signers/src/aws/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ impl super::Signer for AwsSigner {
payload.encode_eip712().map_err(|e| Self::Error::Eip712Error(e.to_string()))?;

let sig = self.sign_digest(digest).await?;
let sig = utils::sig_from_digest_bytes_trial_recovery(&sig, digest.into(), &self.pubkey);
let sig = utils::sig_from_digest_bytes_trial_recovery(&sig, digest, &self.pubkey);

Ok(sig)
}
Expand Down
4 changes: 2 additions & 2 deletions ethers-signers/src/aws/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ pub(super) fn sig_from_digest_bytes_trial_recovery(
let r = U256::from_big_endian(r_bytes.as_slice());
let s = U256::from_big_endian(s_bytes.as_slice());

if check_candidate(&sig, RecoveryId::from_byte(0).unwrap(), digest, vk) {
if check_candidate(sig, RecoveryId::from_byte(0).unwrap(), digest, vk) {
EthSig { r, s, v: 0 }
} else if check_candidate(&sig, RecoveryId::from_byte(1).unwrap(), digest, vk) {
} else if check_candidate(sig, RecoveryId::from_byte(1).unwrap(), digest, vk) {
EthSig { r, s, v: 1 }
} else {
panic!("bad sig");
Expand Down

0 comments on commit 304fe09

Please sign in to comment.