Macro tree_node

Source
macro_rules! tree_node {
    ($val:expr) => { ... };
}
Expand description

§Description

A macro that’s used to make a new TreeNode element.

§Match arms

Arm 1:

  • Takes an i32 data type and makes a new TreeNode element out of it.

§Example

use leetcode_trees_rs::utils::{tree_node, TreeNode};

assert_eq!(tree_node!(5), TreeNode::new(5));