diff options
author | Pierre-Henri Symoneaux <pierre-henri.symoneaux@nokia.com> | 2017-12-03 13:24:49 +0100 |
---|---|---|
committer | Pierre-Henri Symoneaux <pierre-henri.symoneaux@nokia.com> | 2017-12-03 13:34:06 +0100 |
commit | e51b96e215a1a5bf343fd51785e7d5dc7910e0bc (patch) | |
tree | 9b0f9128188fe1af401330a36d8ba707c98b98b3 /src/row.rs | |
parent | 31ff6acd4b69338a1e177c51406136980f6127af (diff) |
Try to make macro works on rust releases 1.13 to 1.19
Diffstat (limited to 'src/row.rs')
-rw-r--r-- | src/row.rs | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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)*))); |