mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +00:00
Proposal: Flatten AllPallets and similar types (#11813)
* flratten AllPallets types * feature flag it * fix * fix * fmt * remove todo * Update frame/support/src/traits/metadata.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update frame/support/src/migrations.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * fix * mark as deprecated * add docs * fix ui test? * fmt Co-authored-by: parity-processbot <> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -19,6 +19,7 @@ use crate::{
|
||||
traits::{GetStorageVersion, PalletInfoAccess},
|
||||
weights::{RuntimeDbWeight, Weight},
|
||||
};
|
||||
use impl_trait_for_tuples::impl_for_tuples;
|
||||
|
||||
/// Trait used by [`migrate_from_pallet_version_to_storage_version`] to do the actual migration.
|
||||
pub trait PalletVersionToStorageVersionHelper {
|
||||
@@ -42,7 +43,9 @@ impl<T: GetStorageVersion + PalletInfoAccess> PalletVersionToStorageVersionHelpe
|
||||
}
|
||||
}
|
||||
|
||||
#[impl_trait_for_tuples::impl_for_tuples(30)]
|
||||
#[cfg_attr(all(not(feature = "tuples-96"), not(feature = "tuples-128")), impl_for_tuples(64))]
|
||||
#[cfg_attr(all(feature = "tuples-96", not(feature = "tuples-128")), impl_for_tuples(96))]
|
||||
#[cfg_attr(feature = "tuples-128", impl_for_tuples(128))]
|
||||
impl PalletVersionToStorageVersionHelper for T {
|
||||
fn migrate(db_weight: &RuntimeDbWeight) -> Weight {
|
||||
let mut weight: Weight = 0;
|
||||
|
||||
Reference in New Issue
Block a user