From 208758b9df70562f299b0066624fef6e87cc5216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=9D=CE=AF=CE=BA=CE=BF=CF=82=20=CE=9C=CE=B1=CF=81=CE=BF?= =?UTF-8?q?=CF=85=CE=BB=CE=AC=CE=BA=CE=B7=CF=82?= Date: Wed, 15 May 2019 15:53:17 +0300 Subject: [PATCH] Update macros.rs Updated macros af_print, join_many and eval to work with expressions instead of identifiers. --- src/macros.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/macros.rs b/src/macros.rs index a085f017c..ddee31df5 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -86,7 +86,7 @@ macro_rules! mem_info { // Using macro to implement join many wrapper #[macro_export] macro_rules! join_many { - [$dim: expr; $($x:ident),+] => { + [$dim: expr; $($x:expr),+] => { { let mut temp_vec = Vec::new(); $( @@ -110,7 +110,7 @@ macro_rules! join_many { /// #[macro_export] macro_rules! af_print { - [$msg: expr, $x: ident] => { + [$msg: expr, $x: expr] => { { print_gen(String::from($msg), &$x, Some(4)); } @@ -120,7 +120,7 @@ macro_rules! af_print { /// Evaluate arbitrary number of arrays #[macro_export] macro_rules! eval { - [$($x:ident),+] => { + [$($x:expr),+] => { { let mut temp_vec = Vec::new(); $(