Fix rust 1.65 lints (#3682)

## Issue Addressed

New lints for rust 1.65

## Proposed Changes

Notable change is the identification or parameters that are only used in recursion

## Additional Info
na
This commit is contained in:
Divma
2022-11-04 07:43:43 +00:00
parent e8604757a2
commit 8600645f65
26 changed files with 37 additions and 77 deletions

View File

@@ -40,7 +40,7 @@ impl ConfigAndPreset {
let extra_fields = get_extra_fields(spec);
if spec.bellatrix_fork_epoch.is_some()
|| fork_name == None
|| fork_name.is_none()
|| fork_name == Some(ForkName::Merge)
{
let bellatrix_preset = BellatrixPreset::from_chain_spec::<T>(spec);
@@ -65,7 +65,7 @@ impl ConfigAndPreset {
/// Get a hashmap of constants to add to the `PresetAndConfig`
pub fn get_extra_fields(spec: &ChainSpec) -> HashMap<String, Value> {
let hex_string = |value: &[u8]| format!("0x{}", hex::encode(&value)).into();
let hex_string = |value: &[u8]| format!("0x{}", hex::encode(value)).into();
let u32_hex = |v: u32| hex_string(&v.to_le_bytes());
let u8_hex = |v: u8| hex_string(&v.to_le_bytes());
hashmap! {

View File

@@ -27,7 +27,7 @@ impl Graffiti {
impl fmt::Display for Graffiti {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}", eth2_serde_utils::hex::encode(&self.0))
write!(f, "{}", eth2_serde_utils::hex::encode(self.0))
}
}