chore(clippy): make clippy happy (#2264)

* chore(clippy): make clippy happy

* chore: silence clippy fp

---------

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
This commit is contained in:
Matthias Seitz 2023-03-16 00:12:34 +01:00 committed by GitHub
parent 72be3376e2
commit 304fe0988d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -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 })
}
}

View File

@ -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)
}

View File

@ -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");