-
Notifications
You must be signed in to change notification settings - Fork 2.6k
sp-api: Put frame-metadata
behind some feature
#14398
Conversation
bot fmt |
@bkchr https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3008401 was started for your command Comment |
@bkchr Command |
let mod_name = generate_runtime_mod_name_for_trait(&decl.ident); | ||
let found_attributes = remove_supported_attributes(&mut decl.attrs); | ||
let api_version = | ||
get_api_version(&found_attributes).map(|v| generate_runtime_api_version(v as u32))?; | ||
let id = generate_runtime_api_id(&decl.ident.to_string()); | ||
|
||
#[cfg(feature = "frame-metadata")] | ||
let metadata = generate_decl_runtime_metadata(&decl); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let metadata = generate_decl_runtime_metadata(&decl); | |
let metadata = crate::runtime_metadata::generate_decl_runtime_metadata(&decl); |
Then you can remove
#[cfg(feature = "frame-metadata")]
use crate::runtime_metadata::generate_decl_runtime_metadata;
altogether and there will be only one #[cfg(feature = "frame-metadata")]
necessary instead of two. (Same for the other file.)
bot merge |
Waiting for commit status. |
Merge cancelled due to error. Error: Github API says #14398 is not mergeable |
Thank you 🙏 |
* sp-api: Put `frame-metadata` behind some feature Closes: paritytech#14296 * ".git/.scripts/commands/fmt/fmt.sh" * Review feedback --------- Co-authored-by: command-bot <>
Closes: #14296