Skip to content

Commit

Permalink
Remove bounds from PrevalidateAttests struct definition (#2886)
Browse files Browse the repository at this point in the history
Removing some bounds as it came up in
#2726 while still keeping
`Send + Sync` capabilities.

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
  • Loading branch information
ggwpez and bkchr authored Jan 9, 2024
1 parent 9d80735 commit 49cea35
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
10 changes: 4 additions & 6 deletions polkadot/runtime/common/src/claims.rs
Original file line number Diff line number Diff line change
Expand Up @@ -591,11 +591,9 @@ impl<T: Config> Pallet<T> {
/// otherwise free to place on chain.
#[derive(Encode, Decode, Clone, Eq, PartialEq, TypeInfo)]
#[scale_info(skip_type_params(T))]
pub struct PrevalidateAttests<T: Config + Send + Sync>(sp_std::marker::PhantomData<T>)
where
<T as frame_system::Config>::RuntimeCall: IsSubType<Call<T>>;
pub struct PrevalidateAttests<T>(core::marker::PhantomData<fn(T)>);

impl<T: Config + Send + Sync> Debug for PrevalidateAttests<T>
impl<T: Config> Debug for PrevalidateAttests<T>
where
<T as frame_system::Config>::RuntimeCall: IsSubType<Call<T>>,
{
Expand All @@ -610,7 +608,7 @@ where
}
}

impl<T: Config + Send + Sync> PrevalidateAttests<T>
impl<T: Config> PrevalidateAttests<T>
where
<T as frame_system::Config>::RuntimeCall: IsSubType<Call<T>>,
{
Expand All @@ -620,7 +618,7 @@ where
}
}

impl<T: Config + Send + Sync> SignedExtension for PrevalidateAttests<T>
impl<T: Config> SignedExtension for PrevalidateAttests<T>
where
<T as frame_system::Config>::RuntimeCall: IsSubType<Call<T>>,
{
Expand Down
13 changes: 13 additions & 0 deletions prdoc/pr_2886.prdoc
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 49cea35

Please sign in to comment.