mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 05:14:35 +00:00
Fix new clippy lints (#2036)
## Issue Addressed NA ## Proposed Changes Fixes new clippy lints in the whole project (mainly [manual_strip](https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip) and [unnecessary_lazy_evaluations](https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations)). Furthermore, removes `to_string()` calls on literals when used with the `?`-operator.
This commit is contained in:
@@ -9,19 +9,19 @@ use types::{BeaconState, EthSpec, SignedBeaconBlock};
|
||||
pub fn run_transition_blocks<T: EthSpec>(matches: &ArgMatches) -> Result<(), String> {
|
||||
let pre_state_path = matches
|
||||
.value_of("pre-state")
|
||||
.ok_or_else(|| "No pre-state file supplied".to_string())?
|
||||
.ok_or("No pre-state file supplied")?
|
||||
.parse::<PathBuf>()
|
||||
.map_err(|e| format!("Failed to parse pre-state path: {}", e))?;
|
||||
|
||||
let block_path = matches
|
||||
.value_of("block")
|
||||
.ok_or_else(|| "No block file supplied".to_string())?
|
||||
.ok_or("No block file supplied")?
|
||||
.parse::<PathBuf>()
|
||||
.map_err(|e| format!("Failed to parse block path: {}", e))?;
|
||||
|
||||
let output_path = matches
|
||||
.value_of("output")
|
||||
.ok_or_else(|| "No output file supplied".to_string())?
|
||||
.ok_or("No output file supplied")?
|
||||
.parse::<PathBuf>()
|
||||
.map_err(|e| format!("Failed to parse output path: {}", e))?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user