Further expand clippy workspace lints

Achieves a notable amount of reduced async and clones.
This commit is contained in:
Luke Parker
2023-12-17 00:01:41 -05:00
parent ea3af28139
commit 065d314e2a
113 changed files with 596 additions and 724 deletions

View File

@@ -24,7 +24,7 @@ use crate::common::{tx::publish_tx, validator_sets::set_keys};
pub async fn provide_batch(serai: &Serai, batch: Batch) -> [u8; 32] {
// TODO: Get the latest session
let set = ValidatorSet { session: Session(0), network: batch.network };
let pair = insecure_pair_from_name(&format!("ValidatorSet {:?}", set));
let pair = insecure_pair_from_name(&format!("ValidatorSet {set:?}"));
let keys = if let Some(keys) =
serai.as_of_latest_finalized_block().await.unwrap().validator_sets().keys(set).await.unwrap()
{

View File

@@ -38,7 +38,7 @@ pub async fn set_keys(serai: &Serai, set: ValidatorSet, key_pair: KeyPair) -> [u
&mut OsRng,
frost::tests::algorithm_machines(
&mut OsRng,
Schnorrkel::new(b"substrate"),
&Schnorrkel::new(b"substrate"),
&HashMap::from([(threshold_keys.params().i(), threshold_keys.into())]),
),
&set_keys_message(&set, &[], &key_pair),