Skip to content

Commit 522bd9e

Browse files
authored
Update Rust Edition to 2024 (#7766)
* #7749 Thanks @dknopik and @michaelsproul for your help!
1 parent bd6b8b6 commit 522bd9e

File tree

468 files changed

+3594
-3396
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

468 files changed

+3594
-3396
lines changed

Cargo.lock

Lines changed: 40 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ members = [
9494
resolver = "2"
9595

9696
[workspace.package]
97-
edition = "2021"
97+
edition = "2024"
9898

9999
[workspace.dependencies]
100100
account_utils = { path = "common/account_utils" }
@@ -208,7 +208,7 @@ quickcheck = "1"
208208
quickcheck_macros = "1"
209209
quote = "1"
210210
r2d2 = "0.8"
211-
rand = "0.8"
211+
rand = "0.9.0"
212212
rayon = "1.7"
213213
regex = "1"
214214
reqwest = { version = "0.11", default-features = false, features = [

account_manager/src/validator/create.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
use crate::common::read_wallet_name_from_cli;
22
use crate::{SECRETS_DIR_FLAG, WALLETS_DIR_FLAG};
33
use account_utils::{
4-
random_password, read_password_from_user, strip_off_newlines, validator_definitions, PlainText,
5-
STDIN_INPUTS_FLAG,
4+
PlainText, STDIN_INPUTS_FLAG, random_password, read_password_from_user, strip_off_newlines,
5+
validator_definitions,
66
};
77
use clap::{Arg, ArgAction, ArgMatches, Command};
88
use clap_utils::FLAG_HEADER;
9-
use directory::{parse_path_or_default_with_flag, DEFAULT_SECRET_DIR, DEFAULT_WALLET_DIR};
9+
use directory::{DEFAULT_SECRET_DIR, DEFAULT_WALLET_DIR, parse_path_or_default_with_flag};
1010
use environment::Environment;
1111
use eth2_wallet_manager::WalletManager;
12-
use slashing_protection::{SlashingDatabase, SLASHING_PROTECTION_FILENAME};
12+
use slashing_protection::{SLASHING_PROTECTION_FILENAME, SlashingDatabase};
1313
use std::ffi::OsStr;
1414
use std::fs;
1515
use std::fs::create_dir_all;
@@ -148,7 +148,9 @@ pub fn cli_run<E: EthSpec>(
148148
return Err(format!(
149149
"No wallet directory at {:?}. Use the `lighthouse --network {} {} {} {}` command to create a wallet",
150150
wallet_base_dir,
151-
matches.get_one::<String>("network").unwrap_or(&String::from("<NETWORK>")),
151+
matches
152+
.get_one::<String>("network")
153+
.unwrap_or(&String::from("<NETWORK>")),
152154
crate::CMD,
153155
crate::wallet::CMD,
154156
crate::wallet::create::CMD

account_manager/src/validator/exit.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use clap::{Arg, ArgAction, ArgMatches, Command};
44
use clap_utils::FLAG_HEADER;
55
use environment::Environment;
66
use eth2::{
7-
types::{GenesisData, StateId, ValidatorData, ValidatorId, ValidatorStatus},
87
BeaconNodeHttpClient, Timeouts,
8+
types::{GenesisData, StateId, ValidatorData, ValidatorId, ValidatorStatus},
99
};
1010
use eth2_keystore::Keystore;
1111
use eth2_network_config::Eth2NetworkConfig;
@@ -239,9 +239,11 @@ async fn publish_voluntary_exit<E: EthSpec>(
239239
let withdrawal_epoch = validator_data.validator.withdrawable_epoch;
240240
let current_epoch = get_current_epoch::<E>(genesis_data.genesis_time, spec)
241241
.ok_or("Failed to get current epoch. Please check your system time")?;
242-
eprintln!("Voluntary exit has been accepted into the beacon chain, but not yet finalized. \
242+
eprintln!(
243+
"Voluntary exit has been accepted into the beacon chain, but not yet finalized. \
243244
Finalization may take several minutes or longer. Before finalization there is a low \
244-
probability that the exit may be reverted.");
245+
probability that the exit may be reverted."
246+
);
245247
eprintln!(
246248
"Current epoch: {}, Exit epoch: {}, Withdrawable epoch: {}",
247249
current_epoch, exit_epoch, withdrawal_epoch
@@ -401,7 +403,7 @@ mod tests {
401403
use eth2_keystore::KeystoreBuilder;
402404
use std::fs::File;
403405
use std::io::Write;
404-
use tempfile::{tempdir, TempDir};
406+
use tempfile::{TempDir, tempdir};
405407

406408
const PASSWORD: &str = "cats";
407409
const KEYSTORE_NAME: &str = "keystore-m_12381_3600_0_0_0-1595406747.json";

0 commit comments

Comments
 (0)