Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: update to Rust 1.81.0 #61

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading