From bf4afd4ffb0eba40192799b7fd7503c56a4bbf6a Mon Sep 17 00:00:00 2001 From: Javier Chatruc Date: Tue, 10 Sep 2024 11:40:36 -0300 Subject: [PATCH] Fix clippy and fmt --- src/eip712/paymaster_params.rs | 5 +---- src/lib.rs | 1 - src/zks_wallet/wallet.rs | 4 ++-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/eip712/paymaster_params.rs b/src/eip712/paymaster_params.rs index 8dcd455..58470aa 100644 --- a/src/eip712/paymaster_params.rs +++ b/src/eip712/paymaster_params.rs @@ -1,7 +1,4 @@ -use ethers::{ - types::Address, - utils::rlp::Encodable, -}; +use ethers::{types::Address, utils::rlp::Encodable}; use serde::Serialize; #[derive(Serialize, serde::Deserialize, Clone, Debug, Default)] diff --git a/src/lib.rs b/src/lib.rs index 14b3691..fb08822 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,7 +2,6 @@ #![forbid(unsafe_code)] #![recursion_limit = "256"] #![warn( - clippy::allow_attributes_without_reason, clippy::as_conversions, clippy::as_ptr_cast_mut, clippy::unnecessary_cast, diff --git a/src/zks_wallet/wallet.rs b/src/zks_wallet/wallet.rs index 51b4393..7fa8208 100644 --- a/src/zks_wallet/wallet.rs +++ b/src/zks_wallet/wallet.rs @@ -634,7 +634,7 @@ where ))?; let filtered_log = logs - .get(0) + .first() .ok_or(ZKSWalletError::CustomError( "Error getting log in receipt".to_owned(), ))? @@ -663,7 +663,7 @@ where let message: Bytes = decode(&[ParamType::Bytes], &filtered_log.data) .map_err(|e| ZKSWalletError::CustomError(format!("failed to decode log data: {e}")))? - .get(0) + .first() .ok_or(ZKSWalletError::CustomError( "Message not found in decoded data".to_owned(), ))?