mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
add use_self clippy lint (#8325)
This commit is contained in:
@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user