mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Fix clippy's performance lints (#1286)
* Fix clippy perf lints * Cargo fmt * Add and to lint rule in Makefile * Fix some leftover clippy lints
This commit is contained in:
@@ -39,7 +39,7 @@ pub fn get_config<E: EthSpec>(
|
||||
fs::remove_dir_all(
|
||||
client_config
|
||||
.get_db_path()
|
||||
.ok_or("Failed to get db_path".to_string())?,
|
||||
.ok_or_else(|| "Failed to get db_path".to_string())?,
|
||||
)
|
||||
.map_err(|err| format!("Failed to remove chain_db: {}", err))?;
|
||||
|
||||
@@ -47,7 +47,7 @@ pub fn get_config<E: EthSpec>(
|
||||
fs::remove_dir_all(
|
||||
client_config
|
||||
.get_freezer_db_path()
|
||||
.ok_or("Failed to get freezer db path".to_string())?,
|
||||
.ok_or_else(|| "Failed to get freezer db path".to_string())?,
|
||||
)
|
||||
.map_err(|err| format!("Failed to remove chain_db: {}", err))?;
|
||||
|
||||
@@ -287,7 +287,7 @@ pub fn get_config<E: EthSpec>(
|
||||
|
||||
if spec_constants != client_config.spec_constants {
|
||||
crit!(log, "Specification constants do not match.";
|
||||
"client_config" => client_config.spec_constants.to_string(),
|
||||
"client_config" => client_config.spec_constants,
|
||||
"eth2_config" => spec_constants
|
||||
);
|
||||
return Err("Specification constant mismatch".into());
|
||||
|
||||
Reference in New Issue
Block a user