mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 03:31:10 +00:00
improve storage macro static checks (#1907)
This commit is contained in:
BIN
Binary file not shown.
@@ -61,7 +61,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
impl_name: create_runtime_str!("substrate-node"),
|
||||
authoring_version: 10,
|
||||
spec_version: 30,
|
||||
impl_version: 33,
|
||||
impl_version: 34,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
};
|
||||
|
||||
|
||||
BIN
Binary file not shown.
@@ -181,12 +181,14 @@ fn decl_store_extra_genesis(
|
||||
|
||||
let mut opt_build;
|
||||
// need build line
|
||||
if let (Some(ref getter), Some(ref config)) = (getter, config) {
|
||||
if let Some(ref config) = config {
|
||||
let ident = if let Some(ident) = config.expr.content.as_ref() {
|
||||
quote!( #ident )
|
||||
} else {
|
||||
} else if let Some(ref getter) = getter {
|
||||
let ident = &getter.getfn.content;
|
||||
quote!( #ident )
|
||||
} else {
|
||||
return Err(syn::Error::new_spanned(name, format!("Invalid storage definiton, couldn't find config identifier: storage must either have a get identifier `get(ident)` or a defined config identifier `config(ident)`")));
|
||||
};
|
||||
if type_infos.kind.is_simple() && ext::has_parametric_type(type_infos.value_type, traitinstance) {
|
||||
is_trait_needed = true;
|
||||
|
||||
Reference in New Issue
Block a user