add use_self clippy lint (#8325)

This commit is contained in:
Thomas Coratger
2024-05-29 15:14:14 +02:00
committed by GitHub
parent 0cb5358fef
commit 19c529e8df
200 changed files with 1817 additions and 1954 deletions

View File

@ -54,7 +54,7 @@ impl<DB> ProviderFactory<DB> {
db: DB,
chain_spec: Arc<ChainSpec>,
static_files_path: PathBuf,
) -> ProviderResult<ProviderFactory<DB>> {
) -> ProviderResult<Self> {
Ok(Self {
db: Arc::new(db),
chain_spec,
@ -89,7 +89,7 @@ impl ProviderFactory<DatabaseEnv> {
args: DatabaseArguments,
static_files_path: PathBuf,
) -> RethResult<Self> {
Ok(ProviderFactory::<DatabaseEnv> {
Ok(Self {
db: Arc::new(init_db(path, args).map_err(RethError::msg)?),
chain_spec,
static_file_provider: StaticFileProvider::new(static_files_path)?,
@ -577,7 +577,7 @@ impl<DB: Database> PruneCheckpointReader for ProviderFactory<DB> {
impl<DB> Clone for ProviderFactory<DB> {
fn clone(&self) -> Self {
ProviderFactory {
Self {
db: Arc::clone(&self.db),
chain_spec: self.chain_spec.clone(),
static_file_provider: self.static_file_provider.clone(),