Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Allow decl-module to have a where clause with trailing comma #6431

Merged
merged 1 commit into from
Jun 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion frame/support/src/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ macro_rules! decl_module {
$trait_instance:ident: $trait_name:ident
$( <I>, I: $instantiable:path $( = $module_default_instance:path )? )?
>
for enum $call_type:ident where origin: $origin_type:ty $(, $where_ty:ty: $where_bound:path )* {
for enum $call_type:ident where origin: $origin_type:ty $(, $where_ty:ty: $where_bound:path )* $(,)? {
$( $t:tt )*
}
) => {
Expand Down Expand Up @@ -317,6 +317,7 @@ macro_rules! decl_module {
origin: $origin_type:ty,
system = $system:ident
$(, $where_ty:ty: $where_bound:path )*
$(,)?
{
$($t:tt)*
}
Expand Down
2 changes: 1 addition & 1 deletion frame/support/test/tests/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub trait Trait: 'static + Eq + Clone {
}

frame_support::decl_module! {
pub struct Module<T: Trait> for enum Call where origin: T::Origin {}
pub struct Module<T: Trait> for enum Call where origin: T::Origin, {}
}

impl<T: Trait> Module<T> {
Expand Down