Skip to content

Commit 208758b

Browse files
nlsnightmare9prady9
authored andcommitted
Update macros.rs
Updated macros af_print, join_many and eval to work with expressions instead of identifiers.
1 parent 1e02c3d commit 208758b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/macros.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ macro_rules! mem_info {
8686
// Using macro to implement join many wrapper
8787
#[macro_export]
8888
macro_rules! join_many {
89-
[$dim: expr; $($x:ident),+] => {
89+
[$dim: expr; $($x:expr),+] => {
9090
{
9191
let mut temp_vec = Vec::new();
9292
$(
@@ -110,7 +110,7 @@ macro_rules! join_many {
110110
///
111111
#[macro_export]
112112
macro_rules! af_print {
113-
[$msg: expr, $x: ident] => {
113+
[$msg: expr, $x: expr] => {
114114
{
115115
print_gen(String::from($msg), &$x, Some(4));
116116
}
@@ -120,7 +120,7 @@ macro_rules! af_print {
120120
/// Evaluate arbitrary number of arrays
121121
#[macro_export]
122122
macro_rules! eval {
123-
[$($x:ident),+] => {
123+
[$($x:expr),+] => {
124124
{
125125
let mut temp_vec = Vec::new();
126126
$(

0 commit comments

Comments
 (0)