mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-22 06:14:38 +00:00
Fix clippy lints
This commit is contained in:
@@ -80,8 +80,7 @@ impl ValidatorSpecification {
|
||||
if response
|
||||
.data
|
||||
.iter()
|
||||
.find(|validator| validator.validating_pubkey == voting_public_key)
|
||||
.is_some()
|
||||
.any(|validator| validator.validating_pubkey == voting_public_key)
|
||||
{
|
||||
if ignore_duplicates {
|
||||
eprintln!(
|
||||
@@ -278,7 +277,7 @@ mod bytes_4_without_0x_prefix {
|
||||
S: serde::Serializer,
|
||||
{
|
||||
let hex_string = &hex::encode(&bytes);
|
||||
serializer.serialize_str(&hex_string)
|
||||
serializer.serialize_str(hex_string)
|
||||
}
|
||||
|
||||
pub fn deserialize<'de, D>(deserializer: D) -> Result<[u8; BYTES_LEN], D::Error>
|
||||
|
||||
@@ -300,8 +300,7 @@ async fn run<'a>(config: MoveConfig) -> Result<(), String> {
|
||||
if response
|
||||
.data
|
||||
.iter()
|
||||
.find(|v| v.validating_pubkey == pubkey_to_move)
|
||||
.is_some()
|
||||
.any(|v| v.validating_pubkey == pubkey_to_move)
|
||||
{
|
||||
eprintln!(
|
||||
"There was an error removing a validator, however the validator \
|
||||
@@ -434,9 +433,7 @@ async fn run<'a>(config: MoveConfig) -> Result<(), String> {
|
||||
return Err(format!("{:?}", e));
|
||||
}
|
||||
Err(UploadError::DuplicateValidator(_)) => {
|
||||
return Err(format!(
|
||||
"Duplicate validator detected when duplicates are ignored"
|
||||
));
|
||||
return Err("Duplicate validator detected when duplicates are ignored".to_string());
|
||||
}
|
||||
Err(UploadError::FailedToListKeys(e)) => {
|
||||
eprintln!(
|
||||
|
||||
Reference in New Issue
Block a user