From e51b96e215a1a5bf343fd51785e7d5dc7910e0bc Mon Sep 17 00:00:00 2001 From: Pierre-Henri Symoneaux Date: Sun, 3 Dec 2017 13:24:49 +0100 Subject: Try to make macro works on rust releases 1.13 to 1.19 --- src/row.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/row.rs') diff --git a/src/row.rs b/src/row.rs index feb78ec..86b7d68 100644 --- a/src/row.rs +++ b/src/row.rs @@ -245,6 +245,7 @@ macro_rules! row { (($($out:tt)*); $style:ident -> $value:expr) => (vec![$($out)* cell!($style -> $value)]); (($($out:tt)*); $style:ident -> $value:expr, $($n: tt)*) => (row!(($($out)* cell!($style -> $value),); $($n)*)); + ($($content:expr), *) => ($crate::row::Row::new(vec![$(cell!($content)), *])); // This line may not be needed starting from Rust 1.20 ($style:ident => $($content:expr), *) => ($crate::row::Row::new(vec![$(cell!($style -> $content)), *])); ($style:ident => $($content:expr,) *) => ($crate::row::Row::new(vec![$(cell!($style -> $content)), *])); ($($content:tt)*) => ($crate::row::Row::new(row!((); $($content)*))); -- cgit v1.2.3