Skip to content

Commit

Permalink
make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
koushiro committed Jun 14, 2023
1 parent 4483bea commit 41a90ef
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 25 deletions.
29 changes: 11 additions & 18 deletions client/db/src/sql/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,8 @@ where
}
None => {
return Err(Error::Protocol(format!(
"Missing ethereum block for hash mismatch {expect_eth_block_hash:?}"
)))
"Missing ethereum block for hash mismatch {expect_eth_block_hash:?}"
)))
}
}
}
Expand Down Expand Up @@ -341,24 +341,17 @@ where
is_canon,
})
}
Err(FindLogError::NotFound) => {
return Err(Error::Protocol(format!(
"[Metadata] No logs found for hash {:?}",
hash
)))
}
Err(FindLogError::MultipleLogs) => {
return Err(Error::Protocol(format!(
"[Metadata] Multiple logs found for hash {:?}",
hash
)))
}
Err(FindLogError::NotFound) => Err(Error::Protocol(format!(
"[Metadata] No logs found for hash {hash:?}",
))),
Err(FindLogError::MultipleLogs) => Err(Error::Protocol(format!(
"[Metadata] Multiple logs found for hash {hash:?}",
))),
}
} else {
return Err(Error::Protocol(format!(
"[Metadata] Failed retrieving header for hash {:?}",
hash
)));
Err(Error::Protocol(format!(
"[Metadata] Failed retrieving header for hash {hash:?}"
)))
}
}

Expand Down
9 changes: 2 additions & 7 deletions template/node/src/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,15 @@ pub fn db_config_dir(config: &Configuration) -> PathBuf {
}

/// Avalailable frontier backend types.
#[derive(Debug, Copy, Clone, clap::ValueEnum)]
#[derive(Debug, Copy, Clone, Default, clap::ValueEnum)]
pub enum BackendType {
/// Either RocksDb or ParityDb as per inherited from the global backend settings.
#[default]
KeyValue,
/// Sql database with custom log indexing.
Sql,
}

impl Default for BackendType {
fn default() -> BackendType {
BackendType::KeyValue
}
}

/// The ethereum-compatibility configuration used to run a node.
#[derive(Clone, Debug, clap::Parser)]
pub struct EthConfiguration {
Expand Down

0 comments on commit 41a90ef

Please sign in to comment.