Skip to content

Commit

Permalink
Update rust-1.81.0 (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrLSD authored Sep 11, 2024
1 parent 9046906 commit 6ead120
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion evm-tests/ethjson/src/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub struct Bytes(Vec<u8>);

impl Bytes {
/// Creates bytes struct.
pub fn new(v: Vec<u8>) -> Self {
pub const fn new(v: Vec<u8>) -> Self {
Self(v)
}
}
Expand Down
9 changes: 6 additions & 3 deletions evm-tests/ethjson/src/spec/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,15 @@ impl ForkSpec {
| Self::HomesteadToEIP150At5
| Self::ByzantiumToConstantinopleFixAt5
| Self::ConstantinopleFixToIstanbulAt5
| Self::EIP150 | Self::EIP158
| Self::Frontier | Self::Homestead
| Self::EIP150
| Self::EIP158
| Self::Frontier
| Self::Homestead
| Self::Byzantium
| Self::Constantinople
| Self::ConstantinopleFix
| Self::Istanbul | Self::Berlin
| Self::Istanbul
| Self::Berlin
)
}
}
Expand Down
2 changes: 1 addition & 1 deletion evm-tests/ethjson/src/test_helpers/skip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub struct StateSkipSubStates {

impl SkipTests {
/// Empty skip states.
pub fn empty() -> Self {
pub const fn empty() -> Self {
Self {
block: Vec::new(),
state: Vec::new(),
Expand Down
6 changes: 4 additions & 2 deletions evm-tests/jsontests/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1107,10 +1107,12 @@ fn test_run(
spec,
ForkSpec::EIP150
| ForkSpec::EIP158 | ForkSpec::Frontier
| ForkSpec::Homestead | ForkSpec::Byzantium
| ForkSpec::Homestead
| ForkSpec::Byzantium
| ForkSpec::Constantinople
| ForkSpec::ConstantinopleFix
| ForkSpec::Istanbul | ForkSpec::Berlin
| ForkSpec::Istanbul
| ForkSpec::Berlin
) && TxType::from_txbytes(&state.txbytes) != TxType::Legacy
&& state.expect_exception.as_deref() == Some("TR_TypeNotSupported");
if expect_tx_type_not_supported {
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.80.0"
channel = "1.81.0"
profile = "minimal"
components = ["rustfmt", "clippy"]
5 changes: 4 additions & 1 deletion src/backend/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ pub struct MemoryBackend<'vicinity> {
impl<'vicinity> MemoryBackend<'vicinity> {
/// Create a new memory backend.
#[must_use]
pub fn new(vicinity: &'vicinity MemoryVicinity, state: BTreeMap<H160, MemoryAccount>) -> Self {
pub const fn new(
vicinity: &'vicinity MemoryVicinity,
state: BTreeMap<H160, MemoryAccount>,
) -> Self {
Self {
vicinity,
state,
Expand Down

0 comments on commit 6ead120

Please sign in to comment.