From 1e9fdbe11d87cf008297e5b07feb250cd30cb387 Mon Sep 17 00:00:00 2001 From: haerdib Date: Wed, 11 Sep 2024 13:26:16 +0200 Subject: [PATCH] fix clippy --- compose-macros/src/lib.rs | 12 +++++++----- primitives/src/config/mod.rs | 2 ++ primitives/src/types.rs | 5 ++--- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/compose-macros/src/lib.rs b/compose-macros/src/lib.rs index c1f0107e0..54dccabce 100644 --- a/compose-macros/src/lib.rs +++ b/compose-macros/src/lib.rs @@ -56,7 +56,7 @@ macro_rules! compose_call { /// * 'pallet_metadata' - This crate's parsed pallet metadata as field of the API. /// * 'call_name' - Call name as &str /// * 'args' - Optional sequence of arguments of the call. They are not checked against the metadata. -/// As of now the user needs to check himself that the correct arguments are supplied. +/// As of now the user needs to check himself that the correct arguments are supplied. #[macro_export] macro_rules! compose_call_for_pallet_metadata { ($pallet_metadata: expr, $call_name: expr $(, $args: expr) *) => { @@ -145,8 +145,9 @@ macro_rules! compose_extrinsic_with_nonce { }; } -/// Generates an UncheckedExtrinsic for the given pallet and call, if they are found within the metadata. -/// Otherwise None is returned. +/// Generates an UncheckedExtrinsic for the given pallet and call from the metadata. +/// +/// Returns None if call is not found within metadata. /// Fetches the nonce from the given `api` instance. If this fails, zero is taken as default nonce. /// See also compose_extrinsic_with_nonce #[macro_export] @@ -164,8 +165,9 @@ macro_rules! compose_extrinsic { }; } -/// Generates an UncheckedExtrinsic for the given pallet and call, if they are found within the metadata. -/// Otherwise None is returned. +/// Generates an UncheckedExtrinsic for the given pallet and call from the metadata. +/// +/// Returns None if call is not found within metadata. /// Fetches the nonce from the given `api` instance. If this fails, zero is taken as default nonce. /// See also compose_extrinsic_with_nonce #[macro_export] diff --git a/primitives/src/config/mod.rs b/primitives/src/config/mod.rs index c630c6766..6de5c64a1 100644 --- a/primitives/src/config/mod.rs +++ b/primitives/src/config/mod.rs @@ -129,6 +129,8 @@ pub trait Config { + DeserializeOwned; } +/// Helper struct for fast Config creation with different Extrinsic Params than the original Config. +/// /// Take a type implementing [`Config`] (eg [`AssetRuntimeConfig`]), and some type which describes the /// additional and extra parameters to pass to an extrinsic (see [`ExtrinsicParams`]), /// and returns a type implementing [`Config`] with those new [`ExtrinsicParams`]. diff --git a/primitives/src/types.rs b/primitives/src/types.rs index ad3170fec..68d8b3557 100644 --- a/primitives/src/types.rs +++ b/primitives/src/types.rs @@ -105,9 +105,8 @@ pub struct InclusionFee { /// - `targeted_fee_adjustment`: This is a multiplier that can tune the final fee based on the /// congestion of the network. /// - `weight_fee`: This amount is computed based on the weight of the transaction. Weight - /// accounts for the execution time of a transaction. - /// - /// adjusted_weight_fee = targeted_fee_adjustment * weight_fee + /// accounts for the execution time of a transaction. + /// - `adjusted_weight_fee`` = targeted_fee_adjustment * weight_fee pub adjusted_weight_fee: Balance, }