Skip to content
Snippets Groups Projects
Commit b332c64e authored by thiolliere's avatar thiolliere Committed by GitHub
Browse files

improve storage macro static checks (#1907)

parent 90eef10d
No related merge requests found
......@@ -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,
};
......
No preview for this file type
......@@ -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;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment