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

@@ -3,6 +3,7 @@ use crate::DumpConfig;
use account_utils::read_password_from_user;
use clap::{Arg, ArgAction, ArgMatches, Command};
use eth2::{
SensitiveUrl,
lighthouse_vc::{
std_types::{
DeleteKeystoreStatus, DeleteKeystoresRequest, ImportKeystoreStatus, InterchangeJsonStr,
@@ -10,7 +11,6 @@ use eth2::{
},
types::{ExportKeystoresResponse, SingleExportKeystoresResponse},
},
SensitiveUrl,
};
use serde::{Deserialize, Serialize};
use std::collections::{HashMap, HashSet};
@@ -458,8 +458,7 @@ async fn run(config: MoveConfig) -> Result<(), String> {
Err(e) => {
eprintln!(
"Retrying after error: {:?}. If this error persists the user will need to \
manually recover their keystore for validator {:?} from the mnemonic."
,
manually recover their keystore for validator {:?} from the mnemonic.",
e, pubkey_to_move
);
}
@@ -668,8 +667,8 @@ mod test {
use crate::import_validators::tests::TestBuilder as ImportTestBuilder;
use account_utils::validator_definitions::SigningDefinition;
use std::fs;
use tempfile::{tempdir, TempDir};
use validator_http_api::{test_utils::ApiTester, Config as HttpConfig};
use tempfile::{TempDir, tempdir};
use validator_http_api::{Config as HttpConfig, test_utils::ApiTester};
const SRC_VC_TOKEN_FILE_NAME: &str = "src_vc_token.json";
const DEST_VC_TOKEN_FILE_NAME: &str = "dest_vc_token.json";
@@ -901,13 +900,13 @@ mod test {
);
if self.reuse_password_files.is_some() {
assert!(
src_vc
.secrets_dir
.path()
.join(format!("{:?}", pubkey))
.exists(),
"the source password file was used by another validator and should not be deleted"
)
src_vc
.secrets_dir
.path()
.join(format!("{:?}", pubkey))
.exists(),
"the source password file was used by another validator and should not be deleted"
)
} else {
assert!(
!src_vc