mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 11:41:02 +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:
@@ -240,9 +240,7 @@ pub fn expand_pallet_struct(def: &mut Def) -> proc_macro2::TokenStream {
|
||||
#config_where_clause
|
||||
{
|
||||
fn count() -> usize { 1 }
|
||||
fn accumulate(
|
||||
acc: &mut #frame_support::sp_std::vec::Vec<#frame_support::traits::PalletInfoData>
|
||||
) {
|
||||
fn infos() -> #frame_support::sp_std::vec::Vec<#frame_support::traits::PalletInfoData> {
|
||||
use #frame_support::traits::PalletInfoAccess;
|
||||
let item = #frame_support::traits::PalletInfoData {
|
||||
index: Self::index(),
|
||||
@@ -250,7 +248,7 @@ pub fn expand_pallet_struct(def: &mut Def) -> proc_macro2::TokenStream {
|
||||
module_name: Self::module_name(),
|
||||
crate_version: Self::crate_version(),
|
||||
};
|
||||
acc.push(item);
|
||||
#frame_support::sp_std::vec![item]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user