Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
sam0x17 committed Sep 9, 2022
1 parent 44fd3d0 commit 7c0103d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions frame/support/procedural/src/pallet/expand/pallet_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ pub fn expand_pallet_struct(def: &mut Def) -> proc_macro2::TokenStream {
quote::quote! { #frame_support::traits::StorageVersion::default() }
};

let whitelisted_storage_names: Vec<syn::Ident> = def
let whitelisted_storage_idents: Vec<syn::Ident> = def
.storages
.iter()
.filter(|s| s.benchmarking_cached)
Expand All @@ -177,13 +177,11 @@ pub fn expand_pallet_struct(def: &mut Def) -> proc_macro2::TokenStream {
use #frame_support::traits::{StorageInfoTrait, TrackedStorageKey, WhitelistedStorageKeys};
impl<#type_impl_gen> WhitelistedStorageKeys for #pallet_ident<#type_use_gen> {
fn whitelisted_storage_keys() -> #frame_support::sp_std::vec::Vec<TrackedStorageKey> {
use #frame_support::sp_std::vec;
use #frame_support::sp_std::vec::Vec;
vec![#(TrackedStorageKey::new(#whitelisted_storage_names::<#type_use_gen>::hashed_key().to_vec())), *]
use #frame_support::sp_std::{vec, vec::Vec};
vec![#(TrackedStorageKey::new(#whitelisted_storage_idents::<#type_use_gen>::hashed_key().to_vec())), *]
}
}
];
println!("{}", whitelisted_storage_keys_impl);

quote::quote_spanned!(def.pallet_struct.attr_span =>
#pallet_error_metadata
Expand Down

0 comments on commit 7c0103d

Please sign in to comment.