Macro mx

Source
macro_rules! mx {
    ($r: expr, $c: expr$(; $v: expr)?) => { ... };
    [$($($v: expr),+);+$(;)?] => { ... };
}
Expand description
use rustrix::*;
 
// Both macro invocations build the same results.
let (rows, cols, init) = (2, 3, 1);
let m1 = mx!(rows, cols; init);
let m2 = mx![
    1, 1, 1;
    1, 1, 1;
];