File tree Expand file tree Collapse file tree
bin/node-template/runtime/src
support/procedural/src/construct_runtime Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -272,10 +272,11 @@ impl pallet_template::Config for Runtime {
272272
273273// Create the runtime by composing the FRAME pallets that were previously configured.
274274construct_runtime ! (
275- pub enum Runtime where
275+ pub struct Runtime
276+ where
276277 Block = Block ,
277278 NodeBlock = opaque:: Block ,
278- UncheckedExtrinsic = UncheckedExtrinsic
279+ UncheckedExtrinsic = UncheckedExtrinsic ,
279280 {
280281 System : frame_system,
281282 RandomnessCollectiveFlip : pallet_randomness_collective_flip,
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
3434type Block = frame_system:: mocking:: MockBlock < Test > ;
3535
3636frame_support:: construct_runtime!(
37- pub enum Test where
37+ pub struct Test where
3838 Block = Block ,
3939 NodeBlock = Block ,
4040 UncheckedExtrinsic = UncheckedExtrinsic ,
Original file line number Diff line number Diff line change @@ -73,7 +73,14 @@ pub struct ExplicitRuntimeDeclaration {
7373impl Parse for RuntimeDeclaration {
7474 fn parse ( input : ParseStream ) -> Result < Self > {
7575 input. parse :: < Token ! [ pub ] > ( ) ?;
76- input. parse :: < Token ! [ enum ] > ( ) ?;
76+
77+ // Support either `enum` or `struct`.
78+ if input. peek ( Token ! [ struct ] ) {
79+ input. parse :: < Token ! [ struct ] > ( ) ?;
80+ } else {
81+ input. parse :: < Token ! [ enum ] > ( ) ?;
82+ }
83+
7784 let name = input. parse :: < syn:: Ident > ( ) ?;
7885 let where_section = input. parse ( ) ?;
7986 let pallets =
You can’t perform that action at this time.
0 commit comments