From 71f8062bc5d8c615198059751a938ea88b8c74ce Mon Sep 17 00:00:00 2001 From: erius Date: Thu, 2 May 2024 11:01:25 +0300 Subject: [PATCH] Changed * to a + in list! macro --- src/linked_list.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linked_list.rs b/src/linked_list.rs index 12698e2..47c9d5c 100644 --- a/src/linked_list.rs +++ b/src/linked_list.rs @@ -15,7 +15,7 @@ impl ListNode { macro_rules! list { () => { None }; ( $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 tail = &mut head;