summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main.rs3
-rw-r--r--src/row.rs1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 2bac3e6..71c0ebe 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,3 +1,4 @@
+// #![feature(trace_macros)]
#[macro_use]
extern crate prettytable;
extern crate term;
@@ -8,7 +9,7 @@ use prettytable::format::*;
use term::{Attr, color};
-//trace_macros!(true);
+// trace_macros!(true);
#[allow(dead_code)]
fn main() {
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)*)));