Skip to content

Commit faaeec3

Browse files
authored
feat: add trailing comma support (darfink#45)
1 parent 3bf7863 commit faaeec3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/macros.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ macro_rules! static_detour {
8585

8686
// 6 — argument and return type (return/void)
8787
(@parse_prototype
88-
($($input:tt)*) | ($($argument_type:ty),*) -> $return_type:ty ; $($rest:tt)*) => {
88+
($($input:tt)*) | ($($argument_type:ty),* $(,)?) -> $return_type:ty ; $($rest:tt)*) => {
8989
$crate::static_detour!(
9090
@parse_terminator ($($input)* ($($argument_type)*) ($return_type)) | ; $($rest)*);
9191
};
92-
(@parse_prototype ($($input:tt)*) | ($($argument_type:ty),*) $($rest:tt)*) => {
92+
(@parse_prototype ($($input:tt)*) | ($($argument_type:ty),* $(,)?) $($rest:tt)*) => {
9393
$crate::static_detour!(@parse_terminator ($($input)* ($($argument_type)*) (())) | $($rest)*);
9494
};
9595

0 commit comments

Comments
 (0)