mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 05:47:58 +00:00
Switch to Rust 2021 (#10170)
* Switch to Rust 2021 * Update trybuild to fix errors
This commit is contained in:
@@ -52,7 +52,7 @@ pub fn expand_constants(def: &mut Def) -> proc_macro2::TokenStream {
|
||||
type_: const_.type_.clone(),
|
||||
doc: const_.doc.clone(),
|
||||
default_byte_impl: quote::quote!(
|
||||
let value = <<T as Config#trait_use_gen>::#ident as
|
||||
let value = <<T as Config #trait_use_gen>::#ident as
|
||||
#frame_support::traits::Get<#const_type>>::get();
|
||||
#frame_support::codec::Encode::encode(&value)
|
||||
),
|
||||
|
||||
@@ -134,12 +134,12 @@ pub fn expand_event(def: &mut Def) -> proc_macro2::TokenStream {
|
||||
impl<#type_impl_gen> Pallet<#type_use_gen> #completed_where_clause {
|
||||
#fn_vis fn deposit_event(event: Event<#event_use_gen>) {
|
||||
let event = <
|
||||
<T as Config#trait_use_gen>::Event as
|
||||
<T as Config #trait_use_gen>::Event as
|
||||
From<Event<#event_use_gen>>
|
||||
>::from(event);
|
||||
|
||||
let event = <
|
||||
<T as Config#trait_use_gen>::Event as
|
||||
<T as Config #trait_use_gen>::Event as
|
||||
Into<<T as #frame_system::Config>::Event>
|
||||
>::into(event);
|
||||
|
||||
|
||||
@@ -75,12 +75,12 @@ fn decl_genesis_config_and_impl_default(
|
||||
#[serde(deny_unknown_fields)]
|
||||
#[serde(crate = #serde_crate)]
|
||||
#serde_bug_bound
|
||||
pub struct GenesisConfig#genesis_struct_decl #genesis_where_clause {
|
||||
pub struct GenesisConfig #genesis_struct_decl #genesis_where_clause {
|
||||
#( #config_fields )*
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
impl#genesis_impl Default for GenesisConfig#genesis_struct #genesis_where_clause {
|
||||
impl #genesis_impl Default for GenesisConfig #genesis_struct #genesis_where_clause {
|
||||
fn default() -> Self {
|
||||
GenesisConfig {
|
||||
#( #config_field_defaults )*
|
||||
@@ -137,7 +137,7 @@ fn impl_build_storage(
|
||||
|
||||
quote! {
|
||||
#[cfg(feature = "std")]
|
||||
impl#genesis_impl GenesisConfig#genesis_struct #genesis_where_clause {
|
||||
impl #genesis_impl GenesisConfig #genesis_struct #genesis_where_clause {
|
||||
/// Build the storage for this module.
|
||||
pub fn build_storage #fn_generic (&self) -> std::result::Result<
|
||||
#scrate::sp_runtime::Storage,
|
||||
@@ -161,7 +161,7 @@ fn impl_build_storage(
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
impl#build_storage_impl #build_storage_impl_trait for GenesisConfig#genesis_struct
|
||||
impl #build_storage_impl #build_storage_impl_trait for GenesisConfig #genesis_struct
|
||||
#where_clause
|
||||
{
|
||||
fn build_module_genesis_storage(
|
||||
|
||||
@@ -92,7 +92,7 @@ pub fn impl_getters(def: &DeclStorageDefExt) -> TokenStream {
|
||||
let where_clause = &def.where_clause;
|
||||
|
||||
quote!(
|
||||
impl#module_impl #module_struct #where_clause {
|
||||
impl #module_impl #module_struct #where_clause {
|
||||
#getters
|
||||
}
|
||||
)
|
||||
|
||||
@@ -207,7 +207,7 @@ pub fn impl_metadata(def: &DeclStorageDefExt) -> TokenStream {
|
||||
quote!(
|
||||
#default_byte_getter_struct_defs
|
||||
|
||||
impl#module_impl #module_struct #where_clause {
|
||||
impl #module_impl #module_struct #where_clause {
|
||||
#[doc(hidden)]
|
||||
pub fn storage_metadata() -> #scrate::metadata::PalletStorageMetadata {
|
||||
#store_metadata
|
||||
|
||||
@@ -48,7 +48,7 @@ pub fn impl_storage_info(def: &DeclStorageDefExt) -> TokenStream {
|
||||
let where_clause = &def.where_clause;
|
||||
|
||||
quote!(
|
||||
impl#module_impl #scrate::traits::StorageInfoTrait for #module_struct #where_clause {
|
||||
impl #module_impl #scrate::traits::StorageInfoTrait for #module_struct #where_clause {
|
||||
fn storage_info() -> #scrate::sp_std::vec::Vec<#scrate::traits::StorageInfo> {
|
||||
let mut res = #scrate::sp_std::vec![];
|
||||
#res_append_storage
|
||||
|
||||
@@ -48,7 +48,7 @@ pub fn decl_and_impl(def: &DeclStorageDefExt) -> TokenStream {
|
||||
#visibility trait #store_trait {
|
||||
#decl_store_items
|
||||
}
|
||||
impl#module_impl #store_trait for #module_struct #where_clause {
|
||||
impl #module_impl #store_trait for #module_struct #where_clause {
|
||||
#impl_store_items
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user