Update Rust Edition to 2024 (#7766)

* #7749

Thanks @dknopik and @michaelsproul for your help!
This commit is contained in:
chonghe
2025-08-13 11:04:31 +08:00
committed by GitHub
parent bd6b8b6a65
commit 522bd9e9c6
468 changed files with 3594 additions and 3396 deletions

View File

@@ -1,15 +1,15 @@
use crate::common::read_wallet_name_from_cli;
use crate::{SECRETS_DIR_FLAG, WALLETS_DIR_FLAG};
use account_utils::{
random_password, read_password_from_user, strip_off_newlines, validator_definitions, PlainText,
STDIN_INPUTS_FLAG,
PlainText, STDIN_INPUTS_FLAG, random_password, read_password_from_user, strip_off_newlines,
validator_definitions,
};
use clap::{Arg, ArgAction, ArgMatches, Command};
use clap_utils::FLAG_HEADER;
use directory::{parse_path_or_default_with_flag, DEFAULT_SECRET_DIR, DEFAULT_WALLET_DIR};
use directory::{DEFAULT_SECRET_DIR, DEFAULT_WALLET_DIR, parse_path_or_default_with_flag};
use environment::Environment;
use eth2_wallet_manager::WalletManager;
use slashing_protection::{SlashingDatabase, SLASHING_PROTECTION_FILENAME};
use slashing_protection::{SLASHING_PROTECTION_FILENAME, SlashingDatabase};
use std::ffi::OsStr;
use std::fs;
use std::fs::create_dir_all;
@@ -148,7 +148,9 @@ pub fn cli_run<E: EthSpec>(
return Err(format!(
"No wallet directory at {:?}. Use the `lighthouse --network {} {} {} {}` command to create a wallet",
wallet_base_dir,
matches.get_one::<String>("network").unwrap_or(&String::from("<NETWORK>")),
matches
.get_one::<String>("network")
.unwrap_or(&String::from("<NETWORK>")),
crate::CMD,
crate::wallet::CMD,
crate::wallet::create::CMD