Fix Rust 1.83 Clippy lints (#6629)

* Fix Rust 1.83 Clippy lints

* Cargo fmt
This commit is contained in:
Michael Sproul
2024-11-29 13:23:54 +11:00
committed by GitHub
parent 38f5f665e1
commit fa6c4c02a3
35 changed files with 73 additions and 77 deletions

View File

@@ -528,9 +528,9 @@ impl BeaconNodeHttpClient {
self.post_with_response(path, &()).await
}
///
/// Analysis endpoints.
///
/*
Analysis endpoints.
*/
/// `GET` lighthouse/analysis/block_rewards?start_slot,end_slot
pub async fn get_lighthouse_analysis_block_rewards(

View File

@@ -120,7 +120,7 @@ pub struct Eth2NetArchiveAndDirectory<'a> {
pub genesis_state_source: GenesisStateSource,
}
impl<'a> Eth2NetArchiveAndDirectory<'a> {
impl Eth2NetArchiveAndDirectory<'_> {
/// The directory that should be used to store files downloaded for this net.
pub fn dir(&self) -> PathBuf {
env::var("CARGO_MANIFEST_DIR")

View File

@@ -105,7 +105,7 @@ impl<'a> AlignedRecordDecorator<'a> {
}
}
impl<'a> Write for AlignedRecordDecorator<'a> {
impl Write for AlignedRecordDecorator<'_> {
fn write(&mut self, buf: &[u8]) -> Result<usize> {
if buf.iter().any(u8::is_ascii_control) {
let filtered = buf
@@ -124,7 +124,7 @@ impl<'a> Write for AlignedRecordDecorator<'a> {
}
}
impl<'a> slog_term::RecordDecorator for AlignedRecordDecorator<'a> {
impl slog_term::RecordDecorator for AlignedRecordDecorator<'_> {
fn reset(&mut self) -> Result<()> {
self.message_active = false;
self.message_count = 0;

View File

@@ -15,7 +15,7 @@ use types::test_utils::generate_deterministic_keypair;
/// A very weak password with which to encrypt the keystores.
pub const INSECURE_PASSWORD: &[u8] = &[50; 51];
impl<'a> Builder<'a> {
impl Builder<'_> {
/// Generate the voting keystore using a deterministic, well-known, **unsafe** keypair.
///
/// **NEVER** use these keys in production!