Skip to content

Commit

Permalink
chore(clippy): make clippy happy (#2727)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Feb 3, 2024
1 parent 4c119e9 commit 79cdcf5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions ethers-providers/src/rpc/transports/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ impl<'de: 'a, 'a> Deserialize<'de> for Response<'a> {
where
D: serde::Deserializer<'de>,
{
#[allow(dead_code)]
struct ResponseVisitor<'a>(&'a ());
impl<'de: 'a, 'a> Visitor<'de> for ResponseVisitor<'a> {
type Value = Response<'a>;
Expand Down
2 changes: 2 additions & 0 deletions ethers-signers/src/aws/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ impl super::Signer for AwsSigner {
type Error = AwsSignerError;

#[instrument(err, skip(message))]
#[allow(clippy::blocks_in_conditions)]
async fn sign_message<S: Send + Sync + AsRef<[u8]>>(
&self,
message: S,
Expand All @@ -236,6 +237,7 @@ impl super::Signer for AwsSigner {
}

#[instrument(err)]
#[allow(clippy::blocks_in_conditions)]
async fn sign_transaction(&self, tx: &TypedTransaction) -> Result<EthSig, Self::Error> {
let mut tx_with_chain = tx.clone();
let chain_id = tx_with_chain.chain_id().map(|id| id.as_u64()).unwrap_or(self.chain_id);
Expand Down
2 changes: 1 addition & 1 deletion ethers-solc/src/remappings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ mod tests {

// <https://doc.rust-lang.org/rust-by-example/std_misc/fs.html>
fn touch(path: &std::path::Path) -> std::io::Result<()> {
match std::fs::OpenOptions::new().create(true).write(true).open(path) {
match std::fs::OpenOptions::new().create(true).append(true).open(path) {
Ok(_) => Ok(()),
Err(e) => Err(e),
}
Expand Down

0 comments on commit 79cdcf5

Please sign in to comment.