chore: add and fix more lints, improve docs (#4765)

This commit is contained in:
DaniPopes
2023-09-25 17:46:46 +02:00
committed by GitHub
parent b701cbc9a3
commit 8f9d2908ca
134 changed files with 709 additions and 625 deletions

View File

@ -1,6 +1,7 @@
use reth_interfaces::RethError;
use reth_primitives::BlockNumber;
use std::{
fmt::Debug,
fmt,
task::{Context, Poll},
};
@ -9,7 +10,6 @@ pub(crate) use controller::{EngineHooksController, PolledHook};
mod prune;
pub use prune::PruneHook;
use reth_interfaces::RethError;
/// Collection of [engine hooks][`EngineHook`].
#[derive(Default)]
@ -17,6 +17,12 @@ pub struct EngineHooks {
inner: Vec<Box<dyn EngineHook>>,
}
impl fmt::Debug for EngineHooks {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("EngineHooks").field("inner", &self.inner.len()).finish()
}
}
impl EngineHooks {
/// Creates a new empty collection of [engine hooks][`EngineHook`].
pub fn new() -> Self {