mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 10:11:44 +00:00
Fix clippy lints for rust 1.62 (#3300)
## Issue Addressed Fixes some new clippy lints after the last rust release ### Lints fixed for the curious: - [cast_abs_to_unsigned](https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned) - [map_identity](https://rust-lang.github.io/rust-clippy/master/index.html#map_identity) - [let_unit_value](https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value) - [crate_in_macro_def](https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def) - [extra_unused_lifetimes](https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes) - [format_push_string](https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string)
This commit is contained in:
@@ -105,7 +105,6 @@ impl ForkChoiceTestDefinition {
|
||||
Hash256::zero(),
|
||||
&spec,
|
||||
)
|
||||
.map_err(|e| e)
|
||||
.unwrap_or_else(|e| {
|
||||
panic!("find_head op at index {} returned error {}", op_index, e)
|
||||
});
|
||||
@@ -132,7 +131,6 @@ impl ForkChoiceTestDefinition {
|
||||
proposer_boost_root,
|
||||
&spec,
|
||||
)
|
||||
.map_err(|e| e)
|
||||
.unwrap_or_else(|e| {
|
||||
panic!("find_head op at index {} returned error {}", op_index, e)
|
||||
});
|
||||
|
||||
@@ -240,7 +240,7 @@ impl ProtoArray {
|
||||
// not exist.
|
||||
node.weight = node
|
||||
.weight
|
||||
.checked_sub(node_delta.abs() as u64)
|
||||
.checked_sub(node_delta.unsigned_abs())
|
||||
.ok_or(Error::DeltaOverflow(node_index))?;
|
||||
} else {
|
||||
node.weight = node
|
||||
|
||||
Reference in New Issue
Block a user