From eacc1daf389088483ff8f8950242ae3b3c32ed2e Mon Sep 17 00:00:00 2001 From: Thomas Niederberger Date: Wed, 22 May 2024 07:57:05 +0200 Subject: [PATCH] Fix clippy issues --- src/api/mod.rs | 13 ++++++------- src/api/rpc_api/author.rs | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/api/mod.rs b/src/api/mod.rs index 4df32aa07..3b1b153e4 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -206,14 +206,13 @@ impl TransactionStatus bool { - match self { + matches!( + self, Self::Usurped(_) - | Self::Finalized(_) - | Self::FinalityTimeout(_) - | Self::Invalid - | Self::Dropped => true, - _ => false, - } + | Self::Finalized(_) + | Self::FinalityTimeout(_) + | Self::Invalid | Self::Dropped + ) } } diff --git a/src/api/rpc_api/author.rs b/src/api/rpc_api/author.rs index 182d4d492..a452c8549 100644 --- a/src/api/rpc_api/author.rs +++ b/src/api/rpc_api/author.rs @@ -396,7 +396,7 @@ where let mut subscription: TransactionSubscriptionFor = self.submit_and_watch_opaque_extrinsic(&encoded_extrinsic).await?; - let determinants: Vec<_> = expected_status.into_iter().map(|d| d.as_u8()).collect(); + let determinants: Vec<_> = expected_status.iter().map(|d| d.as_u8()).collect(); while let Some(transaction_status) = subscription.next().await { let transaction_status = transaction_status?;