mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
Rust 1.54.0 lints (#2483)
## Issue Addressed N/A ## Proposed Changes - Removing a bunch of unnecessary references - Updated `Error::VariantError` to `Error::Variant` - There were additional enum variant lints that I ignored, because I thought our variant names were fine - removed `MonitoredValidator`'s `pubkey` field, because I couldn't find it used anywhere. It looks like we just use the string version of the pubkey (the `id` field) if there is no index ## Additional Info Co-authored-by: realbigsean <seananderson33@gmail.com>
This commit is contained in:
@@ -33,7 +33,7 @@ const USE_STDIN: bool = false;
|
||||
pub enum Error {
|
||||
/// Refused to open a validator with an existing lockfile since that validator may be in-use by
|
||||
/// another process.
|
||||
LockfileError(LockfileError),
|
||||
Lockfile(LockfileError),
|
||||
/// The voting public key in the definition did not match the one in the keystore.
|
||||
VotingPublicKeyMismatch {
|
||||
definition: Box<PublicKey>,
|
||||
@@ -66,7 +66,7 @@ pub enum Error {
|
||||
|
||||
impl From<LockfileError> for Error {
|
||||
fn from(error: LockfileError) -> Self {
|
||||
Self::LockfileError(error)
|
||||
Self::Lockfile(error)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -456,7 +456,7 @@ impl InitializedValidators {
|
||||
read_password(path).map_err(Error::UnableToReadVotingKeystorePassword)?
|
||||
} else {
|
||||
let keystore = open_keystore(voting_keystore_path)?;
|
||||
unlock_keystore_via_stdin_password(&keystore, &voting_keystore_path)?
|
||||
unlock_keystore_via_stdin_password(&keystore, voting_keystore_path)?
|
||||
.0
|
||||
.as_ref()
|
||||
.to_vec()
|
||||
|
||||
Reference in New Issue
Block a user