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,11 +3,11 @@
use eth2_keystore::Keystore;
use eth2_wallet::{
bip39::{Language, Mnemonic, MnemonicType},
Wallet,
bip39::{Language, Mnemonic, MnemonicType},
};
use filesystem::{create_with_600_perms, Error as FsError};
use rand::{distributions::Alphanumeric, Rng};
use filesystem::{Error as FsError, create_with_600_perms};
use rand::{Rng, distr::Alphanumeric};
use std::fs::{self, File};
use std::io;
use std::io::prelude::*;
@@ -115,7 +115,7 @@ pub fn random_password_string() -> Zeroizing<String> {
/// Common implementation for `random_password` and `random_password_string`.
fn random_password_raw_string() -> String {
rand::thread_rng()
rand::rng()
.sample_iter(&Alphanumeric)
.take(DEFAULT_PASSWORD_LEN)
.map(char::from)

View File

@@ -8,11 +8,11 @@ use eth2_keystore::Keystore;
use regex::Regex;
use serde::{Deserialize, Serialize};
use std::collections::HashSet;
use std::fs::{self, create_dir_all, File};
use std::fs::{self, File, create_dir_all};
use std::io;
use std::path::{Path, PathBuf};
use tracing::error;
use types::{graffiti::GraffitiString, Address, PublicKey};
use types::{Address, PublicKey, graffiti::GraffitiString};
use validator_dir::VOTING_KEYSTORE_FILE;
use zeroize::Zeroizing;