Reorder rules of params! macro to fix build on stable
@@ -186,14 +186,6 @@ macro_rules! arg_to_key_val {
#[macro_export]
macro_rules! params_expander {
($vec:expr;) => {};
- ($vec:expr; $name:ident, $($tail:tt)*) => {
- $vec.push(arg_to_key_val!($name));
- params_expander!($vec; $($tail)*);
- };
- ($vec:expr; $name:ident $(, $tail:tt)*) => {
- $vec.push(arg_to_key_val!($name));
- params_expander!($vec; $($tail)*);
- };
($vec:expr; $name:expr => $value:expr, $($tail:tt)*) => {
$vec.push(arg_to_key_val!($name => $value));
params_expander!($vec; $($tail)*);
@@ -202,6 +194,14 @@ macro_rules! params_expander {
$vec.push(arg_to_key_val!($name => $value));
params_expander!($vec; $($tail)*);
};
+ ($vec:expr; $name:ident, $($tail:tt)*) => {
+ $vec.push(arg_to_key_val!($name));
+ params_expander!($vec; $($tail)*);
+ };
+ ($vec:expr; $name:ident $(, $tail:tt)*) => {
+ $vec.push(arg_to_key_val!($name));
+ params_expander!($vec; $($tail)*);
+ };
}
// Until `macro_reexport` stabilisation.
