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

@@ -188,7 +188,7 @@ pub trait TargetArrayChunk: Sized + serde::Serialize + serde::de::DeserializeOwn
txn.put(
Self::select_db(db),
&disk_key.to_be_bytes(),
disk_key.to_be_bytes(),
&compressed_value,
)?;
Ok(())

View File

@@ -301,7 +301,7 @@ impl<E: EthSpec> SlasherDB<E> {
pub fn store_schema_version(&self, txn: &mut RwTransaction<'_>) -> Result<(), Error> {
txn.put(
&self.databases.metadata_db,
&METADATA_VERSION_KEY,
METADATA_VERSION_KEY,
&bincode::serialize(&CURRENT_SCHEMA_VERSION)?,
)?;
Ok(())
@@ -323,7 +323,7 @@ impl<E: EthSpec> SlasherDB<E> {
pub fn store_config(&self, config: &Config, txn: &mut RwTransaction<'_>) -> Result<(), Error> {
txn.put(
&self.databases.metadata_db,
&METADATA_CONFIG_KEY,
METADATA_CONFIG_KEY,
&bincode::serialize(config)?,
)?;
Ok(())
@@ -367,7 +367,7 @@ impl<E: EthSpec> SlasherDB<E> {
txn.put(
&self.databases.attesters_db,
&AttesterKey::new(validator_index, target_epoch, &self.config),
&CompactAttesterRecord::null().as_bytes(),
CompactAttesterRecord::null().as_bytes(),
)?;
}
}
@@ -423,7 +423,7 @@ impl<E: EthSpec> SlasherDB<E> {
key: &IndexedAttestationIdKey,
value: IndexedAttestationId,
) -> Result<(), Error> {
txn.put(&self.databases.indexed_attestation_id_db, key, &value)?;
txn.put(&self.databases.indexed_attestation_id_db, key, value)?;
Ok(())
}
@@ -579,7 +579,7 @@ impl<E: EthSpec> SlasherDB<E> {
txn.put(
&self.databases.attesters_db,
&AttesterKey::new(validator_index, target_epoch, &self.config),
&indexed_attestation_id,
indexed_attestation_id,
)?;
Ok(AttesterSlashingStatus::NotSlashable)