Remove count_args macro.

This commit is contained in:
Stephen Chung 2020-05-21 09:31:31 +08:00
parent 39cd1c8413
commit cd570558c3

View File

@ -190,12 +190,6 @@ impl<PL: Plugin> RegisterPlugin<PL> for Engine {
} }
} }
/// This macro counts the number of arguments via recursion.
macro_rules! count_args {
() => { 0_usize };
( $head:ident $($tail:ident)* ) => { 1_usize + count_args!($($tail)*) };
}
/// This macro creates a closure wrapping a registered function. /// This macro creates a closure wrapping a registered function.
macro_rules! make_func { macro_rules! make_func {
($fn:ident : $map:expr ; $($par:ident => $convert:expr),*) => { ($fn:ident : $map:expr ; $($par:ident => $convert:expr),*) => {