mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 18:21:45 +00:00
Fix clippy warnings (#1385)
## Issue Addressed NA ## Proposed Changes Fixes most clippy warnings and ignores the rest of them, see issue #1388.
This commit is contained in:
@@ -557,9 +557,7 @@ pub async fn attester_slashing<T: BeaconChainTypes>(
|
||||
format!("Error while importing attester slashing: {:?}", e)
|
||||
})
|
||||
} else {
|
||||
Err(format!(
|
||||
"Attester slashing only covers already slashed indices"
|
||||
))
|
||||
Err("Attester slashing only covers already slashed indices".to_string())
|
||||
}
|
||||
})
|
||||
.map_err(ApiError::BadRequest)
|
||||
|
||||
@@ -2,7 +2,6 @@ use crate::{ApiError, ApiResult, NetworkChannel};
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes, StateSkipConfig};
|
||||
use bls::PublicKeyBytes;
|
||||
use eth2_libp2p::PubsubMessage;
|
||||
use hex;
|
||||
use http::header;
|
||||
use hyper::{Body, Request};
|
||||
use itertools::process_results;
|
||||
|
||||
@@ -5,7 +5,6 @@ use hyper::{Body, Request};
|
||||
use rest_types::{Health, SyncingResponse, SyncingStatus};
|
||||
use std::sync::Arc;
|
||||
use types::{EthSpec, Slot};
|
||||
use version;
|
||||
|
||||
/// Read the version string from the current Lighthouse build.
|
||||
pub fn get_version(req: Request<Body>) -> ApiResult {
|
||||
@@ -43,7 +42,7 @@ pub fn syncing<T: EthSpec>(
|
||||
}
|
||||
|
||||
pub fn get_health(req: Request<Body>) -> ApiResult {
|
||||
let health = Health::observe().map_err(|e| ApiError::ServerError(e))?;
|
||||
let health = Health::observe().map_err(ApiError::ServerError)?;
|
||||
|
||||
ResponseBuilder::new(&req)?.body_no_ssz(&health)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user