Changed * to a + in list! macro
This commit is contained in:
parent
8ccc50e6ee
commit
71f8062bc5
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ impl ListNode {
|
||||||
macro_rules! list {
|
macro_rules! list {
|
||||||
() => { None };
|
() => { None };
|
||||||
( $first:expr ) => { Some(Box::new(ListNode::new($first))) };
|
( $first:expr ) => { Some(Box::new(ListNode::new($first))) };
|
||||||
( $first:expr, $($x:expr),* ) => {
|
( $first:expr, $($x:expr),+ ) => {
|
||||||
{
|
{
|
||||||
let mut head = Box::new(ListNode::new($first));
|
let mut head = Box::new(ListNode::new($first));
|
||||||
let mut tail = &mut head;
|
let mut tail = &mut head;
|
||||||
|
|
Loading…
Reference in a new issue