Macro leetcode_rust::vec2d

source ·
macro_rules! vec2d {
    ($([$($x:expr),* $(,)*]),+ $(,)*) => { ... };
}
Expand description

Use a simplified syntax to create nested Vectors (as per needed by several LeetCode problems.)

Examples:

use leetcode_rust::vec2d;

let v = vec2d![[1,2,3],[2,3,4]];
assert_eq!(v[0], vec![1,2,3]);