Skip to content

Commit

Permalink
Fix clippy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Niederb committed Aug 22, 2024
1 parent 0b67ff6 commit eacc1da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,13 @@ impl<Hash: Encode + Decode, BlockHash: Encode + Decode> TransactionStatus<Hash,
/// Returns true if the Transaction reached its final Status
// See https://github.com/paritytech/polkadot-sdk/blob/289f5bbf7a45dc0380904a435464b15ec711ed03/substrate/client/transaction-pool/api/src/lib.rs#L161
pub fn is_final(&self) -> 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
)
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/api/rpc_api/author.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ where
let mut subscription: TransactionSubscriptionFor<Self::Client, Self::Hash> =
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?;
Expand Down

0 comments on commit eacc1da

Please sign in to comment.