Skip to content

Commit ece2e61

Browse files
committed
build: upgrade to Rust v1.83
1 parent ddb12eb commit ece2e61

File tree

17 files changed

+35
-36
lines changed

17 files changed

+35
-36
lines changed

crates/edr_eth/src/filter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ impl<'a> serde::Deserialize<'a> for SubscriptionType {
157157
D: serde::Deserializer<'a>,
158158
{
159159
struct SubscriptionTypeVisitor;
160-
impl<'a> serde::de::Visitor<'a> for SubscriptionTypeVisitor {
160+
impl serde::de::Visitor<'_> for SubscriptionTypeVisitor {
161161
type Value = SubscriptionType;
162162

163163
fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {

crates/edr_eth/src/transaction/pooled/eip4844.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ impl Eip4844 {
173173
#[repr(transparent)]
174174
struct RlpBlob<'blob>(&'blob Blob);
175175

176-
impl<'blob> alloy_rlp::Encodable for RlpBlob<'blob> {
176+
impl alloy_rlp::Encodable for RlpBlob<'_> {
177177
fn encode(&self, out: &mut dyn alloy_rlp::BufMut) {
178178
self.0.as_ref().encode(out);
179179
}
@@ -192,7 +192,7 @@ impl<'blob> From<&'blob Blob> for RlpBlob<'blob> {
192192
#[repr(transparent)]
193193
struct RlpBytes48<'bytes>(&'bytes Bytes48);
194194

195-
impl<'bytes> alloy_rlp::Encodable for RlpBytes48<'bytes> {
195+
impl alloy_rlp::Encodable for RlpBytes48<'_> {
196196
fn encode(&self, out: &mut dyn alloy_rlp::BufMut) {
197197
self.0.as_ref().encode(out);
198198
}

crates/edr_evm/src/state/overrides.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ impl<'overrides, StateT> StateRefOverrider<'overrides, StateT> {
261261
}
262262
}
263263

264-
impl<'state, StateT: StateRef> StateRef for StateRefOverrider<'state, StateT> {
264+
impl<StateT: StateRef> StateRef for StateRefOverrider<'_, StateT> {
265265
type Error = StateT::Error;
266266

267267
fn basic(&self, address: Address) -> Result<Option<AccountInfo>, Self::Error> {

crates/edr_evm/src/state/trie/account.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ struct AccountTrieMutation<'a> {
179179
storage_tries: &'a mut StorageTries,
180180
}
181181

182-
impl<'a> AccountTrieMutation<'a> {
182+
impl AccountTrieMutation<'_> {
183183
#[cfg_attr(feature = "tracing", tracing::instrument(skip(self)))]
184184
pub fn init_account(&mut self, address: &Address, account_info: &AccountInfo) {
185185
let storage_trie = StorageTrie::default();

crates/edr_evm/src/state/trie/state_trie.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ pub(super) struct StateTrieMutation<'a> {
6666
trie_query: TrieQuery,
6767
}
6868

69-
impl<'a> StateTrieMutation<'a> {
69+
impl StateTrieMutation<'_> {
7070
pub fn account(&self, address: &Address) -> Option<BasicAccount> {
7171
self.state_trie.account(address)
7272
}
@@ -90,7 +90,7 @@ impl<'a> StateTrieMutation<'a> {
9090
}
9191
}
9292

93-
impl<'a> Drop for StateTrieMutation<'a> {
93+
impl Drop for StateTrieMutation<'_> {
9494
fn drop(&mut self) {
9595
self.state_trie.root = self.trie_query.root();
9696
}

crates/edr_evm/src/state/trie/storage_trie.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pub(super) struct StorageTrieMutation<'a> {
7474
trie_query: TrieQuery,
7575
}
7676

77-
impl<'a> StorageTrieMutation<'a> {
77+
impl StorageTrieMutation<'_> {
7878
#[cfg_attr(feature = "tracing", tracing::instrument(skip(self)))]
7979
pub fn set_storage_slots(&mut self, storage: &revm::primitives::EvmStorage) {
8080
storage.iter().for_each(|(index, value)| {
@@ -103,7 +103,7 @@ impl<'a> StorageTrieMutation<'a> {
103103
}
104104
}
105105

106-
impl<'a> Drop for StorageTrieMutation<'a> {
106+
impl Drop for StorageTrieMutation<'_> {
107107
fn drop(&mut self) {
108108
self.storage_trie.root = self.trie_query.root();
109109
}

crates/edr_provider/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ impl<LoggerErrorT: Debug + Send + Sync + 'static, TimerT: Clone + TimeSinceEpoch
395395
) => hardhat::handle_add_compilation_result(
396396
data,
397397
solc_version,
398-
compiler_input,
399-
compiler_output,
398+
*compiler_input,
399+
*compiler_output,
400400
)
401401
.and_then(to_json),
402402
MethodInvocation::DropTransaction(transaction_hash) => {

crates/edr_provider/src/pending.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl<'blockchain> BlockchainWithPending<'blockchain> {
4242
}
4343
}
4444

45-
impl<'blockchain> Blockchain<L1ChainSpec> for BlockchainWithPending<'blockchain> {
45+
impl Blockchain<L1ChainSpec> for BlockchainWithPending<'_> {
4646
type BlockchainError = BlockchainError;
4747

4848
type StateError = StateError;
@@ -194,7 +194,7 @@ impl<'blockchain> Blockchain<L1ChainSpec> for BlockchainWithPending<'blockchain>
194194
}
195195
}
196196

197-
impl<'blockchain> BlockchainMut<L1ChainSpec> for BlockchainWithPending<'blockchain> {
197+
impl BlockchainMut<L1ChainSpec> for BlockchainWithPending<'_> {
198198
type Error = BlockchainError;
199199

200200
fn insert_block(
@@ -214,7 +214,7 @@ impl<'blockchain> BlockchainMut<L1ChainSpec> for BlockchainWithPending<'blockcha
214214
}
215215
}
216216

217-
impl<'blockchain> BlockHashRef for BlockchainWithPending<'blockchain> {
217+
impl BlockHashRef for BlockchainWithPending<'_> {
218218
type Error = BlockchainError;
219219

220220
fn block_hash(&self, number: u64) -> Result<B256, Self::Error> {

crates/edr_provider/src/requests/methods.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ pub enum MethodInvocation {
300300
AddCompilationResult(
301301
/// solc version:
302302
String,
303-
CompilerInput,
304-
CompilerOutput,
303+
Box<CompilerInput>,
304+
Box<CompilerOutput>,
305305
),
306306
/// `hardhat_dropTransaction`
307307
#[serde(rename = "hardhat_dropTransaction", with = "edr_eth::serde::sequence")]

crates/edr_provider/tests/hardhat_request_serialization.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ fn serde_hardhat_compiler() {
1818

1919
let call = MethodInvocation::AddCompilationResult(
2020
String::from("0.8.0"),
21-
serde_json::from_str::<CompilerInput>(compiler_input_json).unwrap(),
22-
serde_json::from_str::<CompilerOutput>(compiler_output_json).unwrap(),
21+
serde_json::from_str::<Box<CompilerInput>>(compiler_input_json).unwrap(),
22+
serde_json::from_str::<Box<CompilerOutput>>(compiler_output_json).unwrap(),
2323
);
2424

2525
help_test_method_invocation_serde(call.clone());
@@ -29,14 +29,14 @@ fn serde_hardhat_compiler() {
2929
assert_eq!(
3030
serde_json::to_value(input).unwrap(),
3131
serde_json::to_value(
32-
serde_json::from_str::<CompilerInput>(compiler_input_json).unwrap()
32+
serde_json::from_str::<Box<CompilerInput>>(compiler_input_json).unwrap()
3333
)
3434
.unwrap(),
3535
);
3636
assert_eq!(
3737
serde_json::to_value(output).unwrap(),
3838
serde_json::to_value(
39-
serde_json::from_str::<CompilerOutput>(compiler_output_json).unwrap()
39+
serde_json::from_str::<Box<CompilerOutput>>(compiler_output_json).unwrap()
4040
)
4141
.unwrap(),
4242
);

crates/edr_rpc_client/src/cache/block_spec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub enum CacheableBlockSpec<'a> {
2525
Finalized,
2626
}
2727

28-
impl<'a> CacheKeyVariant for CacheableBlockSpec<'a> {
28+
impl CacheKeyVariant for CacheableBlockSpec<'_> {
2929
fn cache_key_variant(&self) -> u8 {
3030
match self {
3131
CacheableBlockSpec::Number { .. } => 0,

crates/edr_rpc_client/src/cache/filter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ pub enum CacheableLogFilterRange<'a> {
6666
},
6767
}
6868

69-
impl<'a> CacheKeyVariant for CacheableLogFilterRange<'a> {
69+
impl CacheKeyVariant for CacheableLogFilterRange<'_> {
7070
fn cache_key_variant(&self) -> u8 {
7171
match self {
7272
CacheableLogFilterRange::Hash(_) => 0,

crates/edr_rpc_client/src/client.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pub enum RpcClientError {
9292
#[error("{error}. Request: {request}")]
9393
JsonRpcError {
9494
/// The JSON-RPC error
95-
error: jsonrpc::Error,
95+
error: Box<jsonrpc::Error>,
9696
/// The request JSON
9797
request: String,
9898
},
@@ -239,7 +239,7 @@ impl<MethodT: RpcMethod + Serialize> RpcClient<MethodT> {
239239
};
240240

241241
result.map_err(|error| RpcClientError::JsonRpcError {
242-
error,
242+
error: Box::new(error),
243243
request: request.to_json_string(),
244244
})
245245
}
@@ -708,7 +708,7 @@ mod tests {
708708
NetVersion,
709709
}
710710

711-
impl<'method> CachedTestMethod<'method> {
711+
impl CachedTestMethod<'_> {
712712
fn key_hasher(&self) -> Result<cache::KeyHasher, UnresolvedBlockTagError> {
713713
let hasher = KeyHasher::default().hash_u8(self.cache_key_variant());
714714

@@ -770,7 +770,7 @@ mod tests {
770770
}
771771
}
772772

773-
impl<'method> CacheKeyVariant for CachedTestMethod<'method> {
773+
impl CacheKeyVariant for CachedTestMethod<'_> {
774774
fn cache_key_variant(&self) -> u8 {
775775
match self {
776776
Self::GetBlockByNumber { .. } => 0,
@@ -779,7 +779,7 @@ mod tests {
779779
}
780780
}
781781

782-
impl<'method> CacheableMethod for CachedTestMethod<'method> {
782+
impl CacheableMethod for CachedTestMethod<'_> {
783783
type MethodWithResolvableBlockTag = TestMethodWithResolvableBlockSpec;
784784

785785
fn resolve_block_tag(

crates/edr_rpc_client/src/jsonrpc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ impl<'a> Deserialize<'a> for Version {
145145

146146
struct VersionVisitor;
147147

148-
impl<'a> serde::de::Visitor<'a> for VersionVisitor {
148+
impl serde::de::Visitor<'_> for VersionVisitor {
149149
type Value = Version;
150150

151151
fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {

crates/edr_rpc_eth/src/cacheable_method_invocation.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub enum CachedRequestMethod<'a> {
7171
NetVersion,
7272
}
7373

74-
impl<'a> CachedRequestMethod<'a> {
74+
impl CachedRequestMethod<'_> {
7575
// Allow to keep same structure as other RequestMethod and other methods.
7676
#[allow(clippy::match_same_arms)]
7777
fn key_hasher(&self) -> Result<cache::KeyHasher, UnresolvedBlockTagError> {
@@ -266,7 +266,7 @@ impl RpcMethod for RequestMethod {
266266
}
267267
}
268268

269-
impl<'method> CacheableMethod for CachedRequestMethod<'method> {
269+
impl CacheableMethod for CachedRequestMethod<'_> {
270270
type MethodWithResolvableBlockTag = MethodWithResolvableBlockSpec;
271271

272272
fn resolve_block_tag(method: Self::MethodWithResolvableBlockTag, block_number: u64) -> Self {
@@ -337,7 +337,7 @@ impl<'method> CacheableMethod for CachedRequestMethod<'method> {
337337
}
338338
}
339339

340-
impl<'a> CacheKeyVariant for CachedRequestMethod<'a> {
340+
impl CacheKeyVariant for CachedRequestMethod<'_> {
341341
fn cache_key_variant(&self) -> u8 {
342342
match self {
343343
// The commented out methods have been removed as they're not currently in use by the

crates/edr_solidity/src/compiler.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//! Processes the Solidity compiler standard JSON[^1] input and output AST and
22
//! creates the source model used to perform the stack trace decoding.
3-
3+
//!
4+
//! [^1]: See <https://docs.soliditylang.org/en/latest/using-the-compiler.html#compiler-input-and-output-json-description>.
45
use std::{collections::HashMap, str::FromStr, sync::Arc};
56

67
use anyhow::{self, Context as _};
@@ -23,12 +24,10 @@ use crate::{
2324
pub const FIRST_SOLC_VERSION_SUPPORTED: semver::Version = semver::Version::new(0, 5, 1);
2425

2526
/// For the Solidity compiler version and its standard JSON input and
26-
/// output[^1], creates the source model, decodes the bytecode with source
27+
/// output, creates the source model, decodes the bytecode with source
2728
/// mapping and links them to the source files.
2829
///
2930
/// Returns the decoded bytecodes that reference the resolved source model.
30-
///
31-
/// [^1]: See <https://docs.soliditylang.org/en/latest/using-the-compiler.html#compiler-input-and-output-json-description>.
3231
pub fn create_models_and_decode_bytecodes(
3332
solc_version: String,
3433
compiler_input: &CompilerInput,

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.81
1+
1.83

0 commit comments

Comments
 (0)