From 49cea35d0a13c145091e8b4df4efeb2f7b92f812 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 9 Jan 2024 18:44:50 +0100 Subject: [PATCH] Remove bounds from `PrevalidateAttests` struct definition (#2886) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removing some bounds as it came up in https://github.com/paritytech/polkadot-sdk/pull/2726 while still keeping `Send + Sync` capabilities. --------- Signed-off-by: Oliver Tale-Yazdi Co-authored-by: Bastian Köcher --- polkadot/runtime/common/src/claims.rs | 10 ++++------ prdoc/pr_2886.prdoc | 13 +++++++++++++ 2 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 prdoc/pr_2886.prdoc diff --git a/polkadot/runtime/common/src/claims.rs b/polkadot/runtime/common/src/claims.rs index d15e04a660f7..4cddab969c08 100644 --- a/polkadot/runtime/common/src/claims.rs +++ b/polkadot/runtime/common/src/claims.rs @@ -591,11 +591,9 @@ impl Pallet { /// otherwise free to place on chain. #[derive(Encode, Decode, Clone, Eq, PartialEq, TypeInfo)] #[scale_info(skip_type_params(T))] -pub struct PrevalidateAttests(sp_std::marker::PhantomData) -where - ::RuntimeCall: IsSubType>; +pub struct PrevalidateAttests(core::marker::PhantomData); -impl Debug for PrevalidateAttests +impl Debug for PrevalidateAttests where ::RuntimeCall: IsSubType>, { @@ -610,7 +608,7 @@ where } } -impl PrevalidateAttests +impl PrevalidateAttests where ::RuntimeCall: IsSubType>, { @@ -620,7 +618,7 @@ where } } -impl SignedExtension for PrevalidateAttests +impl SignedExtension for PrevalidateAttests where ::RuntimeCall: IsSubType>, { diff --git a/prdoc/pr_2886.prdoc b/prdoc/pr_2886.prdoc new file mode 100644 index 000000000000..9fd97c11e111 --- /dev/null +++ b/prdoc/pr_2886.prdoc @@ -0,0 +1,13 @@ +# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 +# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json + +title: Remove bounds from `PrevalidateAttests` struct definition + +doc: + - audience: Runtime Dev + description: | + Minimal change to `PrevalidateAssets` to remove some trait bounds on the struct itself while + keeping all its capabilities. + +crates: + - name: polkadot-runtime-common