From ab4c8e4fe5e1b1c9bb347fd885e6524ab389b0ba Mon Sep 17 00:00:00 2001 From: Guillaume Thiolliere Date: Fri, 1 Jan 2021 17:46:38 +0100 Subject: [PATCH] remove some unecessary bound (#7813) --- substrate/frame/transaction-payment/rpc/src/lib.rs | 2 +- substrate/frame/transaction-payment/src/lib.rs | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/substrate/frame/transaction-payment/rpc/src/lib.rs b/substrate/frame/transaction-payment/rpc/src/lib.rs index 5043f0257f..bf1565f1a4 100644 --- a/substrate/frame/transaction-payment/rpc/src/lib.rs +++ b/substrate/frame/transaction-payment/rpc/src/lib.rs @@ -73,7 +73,7 @@ impl TransactionPaymentApi<::Hash, RuntimeDi for TransactionPayment where Block: BlockT, - C: Send + Sync + 'static + ProvideRuntimeApi + HeaderBackend, + C: 'static + ProvideRuntimeApi + HeaderBackend, C::Api: TransactionPaymentRuntimeApi, Balance: Codec + MaybeDisplay + MaybeFromStr, { diff --git a/substrate/frame/transaction-payment/src/lib.rs b/substrate/frame/transaction-payment/src/lib.rs index a787836d24..a9c595e57a 100644 --- a/substrate/frame/transaction-payment/src/lib.rs +++ b/substrate/frame/transaction-payment/src/lib.rs @@ -314,8 +314,6 @@ impl Module where len: u32, ) -> RuntimeDispatchInfo> where - T: Send + Sync, - BalanceOf: Send + Sync, T::Call: Dispatchable, { // NOTE: we can actually make it understand `ChargeTransactionPayment`, but would be some @@ -444,9 +442,9 @@ impl Convert> for Module where /// Require the transactor pay for themselves and maybe include a tip to gain additional priority /// in the queue. #[derive(Encode, Decode, Clone, Eq, PartialEq)] -pub struct ChargeTransactionPayment(#[codec(compact)] BalanceOf); +pub struct ChargeTransactionPayment(#[codec(compact)] BalanceOf); -impl ChargeTransactionPayment where +impl ChargeTransactionPayment where T::Call: Dispatchable, BalanceOf: Send + Sync + FixedPointOperand, { @@ -494,7 +492,7 @@ impl ChargeTransactionPayment where } } -impl sp_std::fmt::Debug for ChargeTransactionPayment { +impl sp_std::fmt::Debug for ChargeTransactionPayment { #[cfg(feature = "std")] fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { write!(f, "ChargeTransactionPayment<{:?}>", self.0) @@ -505,7 +503,7 @@ impl sp_std::fmt::Debug for ChargeTransactionPayment } } -impl SignedExtension for ChargeTransactionPayment where +impl SignedExtension for ChargeTransactionPayment where BalanceOf: Send + Sync + From + FixedPointOperand, T::Call: Dispatchable, {