Skip to content

Commit 49cea35

Browse files
ggwpezbkchr
andauthored
Remove bounds from PrevalidateAttests struct definition (#2886)
Removing some bounds as it came up in #2726 while still keeping `Send + Sync` capabilities. --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
1 parent 9d80735 commit 49cea35

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

polkadot/runtime/common/src/claims.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -591,11 +591,9 @@ impl<T: Config> Pallet<T> {
591591
/// otherwise free to place on chain.
592592
#[derive(Encode, Decode, Clone, Eq, PartialEq, TypeInfo)]
593593
#[scale_info(skip_type_params(T))]
594-
pub struct PrevalidateAttests<T: Config + Send + Sync>(sp_std::marker::PhantomData<T>)
595-
where
596-
<T as frame_system::Config>::RuntimeCall: IsSubType<Call<T>>;
594+
pub struct PrevalidateAttests<T>(core::marker::PhantomData<fn(T)>);
597595

598-
impl<T: Config + Send + Sync> Debug for PrevalidateAttests<T>
596+
impl<T: Config> Debug for PrevalidateAttests<T>
599597
where
600598
<T as frame_system::Config>::RuntimeCall: IsSubType<Call<T>>,
601599
{
@@ -610,7 +608,7 @@ where
610608
}
611609
}
612610

613-
impl<T: Config + Send + Sync> PrevalidateAttests<T>
611+
impl<T: Config> PrevalidateAttests<T>
614612
where
615613
<T as frame_system::Config>::RuntimeCall: IsSubType<Call<T>>,
616614
{
@@ -620,7 +618,7 @@ where
620618
}
621619
}
622620

623-
impl<T: Config + Send + Sync> SignedExtension for PrevalidateAttests<T>
621+
impl<T: Config> SignedExtension for PrevalidateAttests<T>
624622
where
625623
<T as frame_system::Config>::RuntimeCall: IsSubType<Call<T>>,
626624
{

prdoc/pr_2886.prdoc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
2+
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json
3+
4+
title: Remove bounds from `PrevalidateAttests` struct definition
5+
6+
doc:
7+
- audience: Runtime Dev
8+
description: |
9+
Minimal change to `PrevalidateAssets` to remove some trait bounds on the struct itself while
10+
keeping all its capabilities.
11+
12+
crates:
13+
- name: polkadot-runtime-common

0 commit comments

Comments
 (0)