Skip to content

Commit

Permalink
chore: make nightly clippy happy again
Browse files Browse the repository at this point in the history
  • Loading branch information
xJonathanLEI committed Oct 20, 2024
1 parent e73a71d commit 2528363
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 47 deletions.
6 changes: 3 additions & 3 deletions starknet-accounts/src/account/declaration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ impl RawLegacyDeclaration {
}
}

impl<'a, A> PreparedDeclarationV2<'a, A>
impl<A> PreparedDeclarationV2<'_, A>
where
A: Account,
{
Expand Down Expand Up @@ -1057,7 +1057,7 @@ where
}
}

impl<'a, A> PreparedDeclarationV3<'a, A>
impl<A> PreparedDeclarationV3<'_, A>
where
A: Account,
{
Expand Down Expand Up @@ -1126,7 +1126,7 @@ where
}
}

impl<'a, A> PreparedLegacyDeclaration<'a, A>
impl<A> PreparedLegacyDeclaration<'_, A>
where
A: Account,
{
Expand Down
4 changes: 2 additions & 2 deletions starknet-accounts/src/account/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ impl RawExecutionV3 {
}
}

impl<'a, A> PreparedExecutionV1<'a, A>
impl<A> PreparedExecutionV1<'_, A>
where
A: Account,
{
Expand All @@ -746,7 +746,7 @@ where
}
}

impl<'a, A> PreparedExecutionV3<'a, A>
impl<A> PreparedExecutionV3<'_, A>
where
A: Account,
{
Expand Down
8 changes: 4 additions & 4 deletions starknet-contract/src/factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ where
}
}

impl<'f, A> DeploymentV1<'f, A> {
impl<A> DeploymentV1<'_, A> {
/// Returns a new [`DeploymentV1`] with the `nonce`.
pub fn nonce(self, nonce: Felt) -> Self {
Self {
Expand Down Expand Up @@ -167,7 +167,7 @@ impl<'f, A> DeploymentV1<'f, A> {
}
}

impl<'f, A> DeploymentV3<'f, A> {
impl<A> DeploymentV3<'_, A> {
/// Returns a new [`DeploymentV3`] with the `nonce`.
pub fn nonce(self, nonce: Felt) -> Self {
Self {
Expand Down Expand Up @@ -213,7 +213,7 @@ impl<'f, A> DeploymentV3<'f, A> {
}
}

impl<'f, A> DeploymentV1<'f, A>
impl<A> DeploymentV1<'_, A>
where
A: Account,
{
Expand All @@ -235,7 +235,7 @@ where
}
}

impl<'f, A> DeploymentV3<'f, A>
impl<A> DeploymentV3<'_, A>
where
A: Account,
{
Expand Down
2 changes: 1 addition & 1 deletion starknet-core/src/serde/byte_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub mod base64 {
deserializer.deserialize_any(Base64Visitor)
}

impl<'de> Visitor<'de> for Base64Visitor {
impl Visitor<'_> for Base64Visitor {
type Value = Vec<u8>;

fn expecting(&self, formatter: &mut Formatter<'_>) -> alloc::fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion starknet-core/src/serde/num_hex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub mod u64 {
}
}

impl<'de> Visitor<'de> for NumHexVisitor {
impl Visitor<'_> for NumHexVisitor {
type Value = u64;

fn expecting(&self, formatter: &mut Formatter<'_>) -> alloc::fmt::Result {
Expand Down
6 changes: 3 additions & 3 deletions starknet-core/src/serde/unsigned_field_element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl<'de> DeserializeAs<'de, Felt> for UfeHex {
}
}

impl<'de> Visitor<'de> for UfeHexVisitor {
impl Visitor<'_> for UfeHexVisitor {
type Value = Felt;

fn expecting(&self, formatter: &mut Formatter<'_>) -> alloc::fmt::Result {
Expand Down Expand Up @@ -112,7 +112,7 @@ impl<'de> DeserializeAs<'de, Option<Felt>> for UfeHexOption {
}
}

impl<'de> Visitor<'de> for UfeHexOptionVisitor {
impl Visitor<'_> for UfeHexOptionVisitor {
type Value = Option<Felt>;

fn expecting(&self, formatter: &mut Formatter<'_>) -> alloc::fmt::Result {
Expand Down Expand Up @@ -180,7 +180,7 @@ impl<'de> DeserializeAs<'de, Option<Felt>> for UfePendingBlockHash {
}
}

impl<'de> Visitor<'de> for UfePendingBlockHashVisitor {
impl Visitor<'_> for UfePendingBlockHashVisitor {
type Value = Option<Felt>;

fn expecting(&self, formatter: &mut Formatter<'_>) -> alloc::fmt::Result {
Expand Down
50 changes: 25 additions & 25 deletions starknet-core/src/types/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// https://github.com/xJonathanLEI/starknet-jsonrpc-codegen

// Code generated with version:
// https://github.com/xJonathanLEI/starknet-jsonrpc-codegen#f1278dfb2ae57d319093421c038f6ec7a3dfba2f
// https://github.com/xJonathanLEI/starknet-jsonrpc-codegen#66aa909a760ed0800232a2ca13ece97b9ea32d24

// These types are ignored from code generation. Implement them manually:
// - `RECEIPT_BLOCK`
Expand Down Expand Up @@ -4595,7 +4595,7 @@ impl Serialize for AddDeclareTransactionRequest {
}
}

impl<'a> Serialize for AddDeclareTransactionRequestRef<'a> {
impl Serialize for AddDeclareTransactionRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[derive(Serialize)]
#[serde(transparent)]
Expand Down Expand Up @@ -4672,7 +4672,7 @@ impl Serialize for AddDeployAccountTransactionRequest {
}
}

impl<'a> Serialize for AddDeployAccountTransactionRequestRef<'a> {
impl Serialize for AddDeployAccountTransactionRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[derive(Serialize)]
#[serde(transparent)]
Expand Down Expand Up @@ -4749,7 +4749,7 @@ impl Serialize for AddInvokeTransactionRequest {
}
}

impl<'a> Serialize for AddInvokeTransactionRequestRef<'a> {
impl Serialize for AddInvokeTransactionRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[derive(Serialize)]
#[serde(transparent)]
Expand Down Expand Up @@ -4873,7 +4873,7 @@ impl Serialize for CallRequest {
}
}

impl<'a> Serialize for CallRequestRef<'a> {
impl Serialize for CallRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[derive(Serialize)]
#[serde(transparent)]
Expand Down Expand Up @@ -5011,7 +5011,7 @@ impl Serialize for EstimateFeeRequest {
}
}

impl<'a> Serialize for EstimateFeeRequestRef<'a> {
impl Serialize for EstimateFeeRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[derive(Serialize)]
#[serde(transparent)]
Expand Down Expand Up @@ -5145,7 +5145,7 @@ impl Serialize for EstimateMessageFeeRequest {
}
}

impl<'a> Serialize for EstimateMessageFeeRequestRef<'a> {
impl Serialize for EstimateMessageFeeRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[derive(Serialize)]
#[serde(transparent)]
Expand Down Expand Up @@ -5246,7 +5246,7 @@ impl Serialize for GetBlockTransactionCountRequest {
}
}

impl<'a> Serialize for GetBlockTransactionCountRequestRef<'a> {
impl Serialize for GetBlockTransactionCountRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[derive(Serialize)]
#[serde(transparent)]
Expand Down Expand Up @@ -5323,7 +5323,7 @@ impl Serialize for GetBlockWithReceiptsRequest {
}
}

impl<'a> Serialize for GetBlockWithReceiptsRequestRef<'a> {
impl Serialize for GetBlockWithReceiptsRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[derive(Serialize)]
#[serde(transparent)]
Expand Down Expand Up @@ -5400,7 +5400,7 @@ impl Serialize for GetBlockWithTxHashesRequest {
}
}

impl<'a> Serialize for GetBlockWithTxHashesRequestRef<'a> {
impl Serialize for GetBlockWithTxHashesRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[derive(Serialize)]
#[serde(transparent)]
Expand Down Expand Up @@ -5477,7 +5477,7 @@ impl Serialize for GetBlockWithTxsRequest {
}
}

impl<'a> Serialize for GetBlockWithTxsRequestRef<'a> {
impl Serialize for GetBlockWithTxsRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[derive(Serialize)]
#[serde(transparent)]
Expand Down Expand Up @@ -5565,7 +5565,7 @@ impl Serialize for GetClassAtRequest {
}
}

impl<'a> Serialize for GetClassAtRequestRef<'a> {
impl Serialize for GetClassAtRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[derive(Serialize)]
#[serde(transparent)]
Expand Down Expand Up @@ -5682,7 +5682,7 @@ impl Serialize for GetClassHashAtRequest {
}
}

impl<'a> Serialize for GetClassHashAtRequestRef<'a> {
impl Serialize for GetClassHashAtRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[derive(Serialize)]
#[serde(transparent)]
Expand Down Expand Up @@ -5799,7 +5799,7 @@ impl Serialize for GetClassRequest {
}
}

impl<'a> Serialize for GetClassRequestRef<'a> {
impl Serialize for GetClassRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[derive(Serialize)]
#[serde(transparent)]
Expand Down Expand Up @@ -5905,7 +5905,7 @@ impl Serialize for GetEventsRequest {
}
}

impl<'a> Serialize for GetEventsRequestRef<'a> {
impl Serialize for GetEventsRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[derive(Serialize)]
#[serde(transparent)]
Expand Down Expand Up @@ -5993,7 +5993,7 @@ impl Serialize for GetNonceRequest {
}
}

impl<'a> Serialize for GetNonceRequestRef<'a> {
impl Serialize for GetNonceRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[derive(Serialize)]
#[serde(transparent)]
Expand Down Expand Up @@ -6099,7 +6099,7 @@ impl Serialize for GetStateUpdateRequest {
}
}

impl<'a> Serialize for GetStateUpdateRequestRef<'a> {
impl Serialize for GetStateUpdateRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[derive(Serialize)]
#[serde(transparent)]
Expand Down Expand Up @@ -6196,7 +6196,7 @@ impl Serialize for GetStorageAtRequest {
}
}

impl<'a> Serialize for GetStorageAtRequestRef<'a> {
impl Serialize for GetStorageAtRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[serde_as]
#[derive(Serialize)]
Expand Down Expand Up @@ -6336,7 +6336,7 @@ impl Serialize for GetTransactionByBlockIdAndIndexRequest {
}
}

impl<'a> Serialize for GetTransactionByBlockIdAndIndexRequestRef<'a> {
impl Serialize for GetTransactionByBlockIdAndIndexRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[derive(Serialize)]
#[serde(transparent)]
Expand Down Expand Up @@ -6437,7 +6437,7 @@ impl Serialize for GetTransactionByHashRequest {
}
}

impl<'a> Serialize for GetTransactionByHashRequestRef<'a> {
impl Serialize for GetTransactionByHashRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[serde_as]
#[derive(Serialize)]
Expand Down Expand Up @@ -6521,7 +6521,7 @@ impl Serialize for GetTransactionReceiptRequest {
}
}

impl<'a> Serialize for GetTransactionReceiptRequestRef<'a> {
impl Serialize for GetTransactionReceiptRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[serde_as]
#[derive(Serialize)]
Expand Down Expand Up @@ -6605,7 +6605,7 @@ impl Serialize for GetTransactionStatusRequest {
}
}

impl<'a> Serialize for GetTransactionStatusRequestRef<'a> {
impl Serialize for GetTransactionStatusRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[serde_as]
#[derive(Serialize)]
Expand Down Expand Up @@ -6705,7 +6705,7 @@ impl Serialize for SimulateTransactionsRequest {
}
}

impl<'a> Serialize for SimulateTransactionsRequestRef<'a> {
impl Serialize for SimulateTransactionsRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[derive(Serialize)]
#[serde(transparent)]
Expand Down Expand Up @@ -6868,7 +6868,7 @@ impl Serialize for TraceBlockTransactionsRequest {
}
}

impl<'a> Serialize for TraceBlockTransactionsRequestRef<'a> {
impl Serialize for TraceBlockTransactionsRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[derive(Serialize)]
#[serde(transparent)]
Expand Down Expand Up @@ -6947,7 +6947,7 @@ impl Serialize for TraceTransactionRequest {
}
}

impl<'a> Serialize for TraceTransactionRequestRef<'a> {
impl Serialize for TraceTransactionRequestRef<'_> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
#[serde_as]
#[derive(Serialize)]
Expand Down
2 changes: 1 addition & 1 deletion starknet-core/src/types/eth_address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ impl<'de> Deserialize<'de> for EthAddress {
}
}

impl<'de> Visitor<'de> for EthAddressVisitor {
impl Visitor<'_> for EthAddressVisitor {
type Value = EthAddress;

fn expecting(&self, formatter: &mut Formatter<'_>) -> alloc::fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion starknet-core/src/types/hash_256.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl<'de> Deserialize<'de> for Hash256 {
}
}

impl<'de> Visitor<'de> for Hash256Visitor {
impl Visitor<'_> for Hash256Visitor {
type Value = Hash256;

fn expecting(&self, formatter: &mut Formatter<'_>) -> alloc::fmt::Result {
Expand Down
4 changes: 2 additions & 2 deletions starknet-core/src/types/serde_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl<'de> DeserializeAs<'de, u128> for NumAsHex {
}
}

impl<'de> Visitor<'de> for NumAsHexVisitorU64 {
impl Visitor<'_> for NumAsHexVisitorU64 {
type Value = u64;

fn expecting(&self, formatter: &mut Formatter<'_>) -> alloc::fmt::Result {
Expand Down Expand Up @@ -95,7 +95,7 @@ impl<'de> Visitor<'de> for NumAsHexVisitorU64 {
}
}

impl<'de> Visitor<'de> for NumAsHexVisitorU128 {
impl Visitor<'_> for NumAsHexVisitorU128 {
type Value = u128;

fn expecting(&self, formatter: &mut Formatter<'_>) -> alloc::fmt::Result {
Expand Down
Loading

0 comments on commit 2528363

Please sign in to comment.