mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-16 12:28:24 +00:00
Address clippy lints, panic in ssz_derive on overflow (#1714)
## Issue Addressed NA ## Proposed Changes - Panic or return error if we overflow `usize` in SSZ decoding/encoding derive macros. - I claim that the panics can only be triggered by a faulty type definition in lighthouse, they cannot be triggered externally on a validly defined struct. - Use `Ordering` instead of some `if` statements, as demanded by clippy. - Remove some old clippy `allow` that seem to no longer be required. - Add comments to interesting clippy statements that we're going to continue to ignore. - Create #1713 ## Additional Info NA
This commit is contained in:
@@ -300,7 +300,6 @@ where
|
||||
/// Equivalent to:
|
||||
///
|
||||
/// https://github.com/ethereum/eth2.0-specs/blob/v0.12.1/specs/phase0/fork-choice.md#get_ancestor
|
||||
#[allow(clippy::if_same_then_else)]
|
||||
fn get_ancestor(
|
||||
&self,
|
||||
block_root: Hash256,
|
||||
|
||||
Reference in New Issue
Block a user