mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 11:38:01 +00:00
construct_runtime!: Support parsing struct Runtime (#11932)
* construct_runtime!: Support parsing `struct Runtime` * FMT
This commit is contained in:
@@ -73,7 +73,14 @@ pub struct ExplicitRuntimeDeclaration {
|
||||
impl Parse for RuntimeDeclaration {
|
||||
fn parse(input: ParseStream) -> Result<Self> {
|
||||
input.parse::<Token![pub]>()?;
|
||||
input.parse::<Token![enum]>()?;
|
||||
|
||||
// Support either `enum` or `struct`.
|
||||
if input.peek(Token![struct]) {
|
||||
input.parse::<Token![struct]>()?;
|
||||
} else {
|
||||
input.parse::<Token![enum]>()?;
|
||||
}
|
||||
|
||||
let name = input.parse::<syn::Ident>()?;
|
||||
let where_section = input.parse()?;
|
||||
let pallets =
|
||||
|
||||
Reference in New Issue
Block a user