From 6a2638ff6e34a15c8e10dbc8fff033cfaae67eb0 Mon Sep 17 00:00:00 2001 From: "bagus.cahyono" Date: Tue, 21 Jan 2025 11:30:46 +0700 Subject: [PATCH] fix: clippy error message not inline with the intent. --- exercises/22_clippy/clippy3.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exercises/22_clippy/clippy3.rs b/exercises/22_clippy/clippy3.rs index 7a3cb390..c5c1c56c 100644 --- a/exercises/22_clippy/clippy3.rs +++ b/exercises/22_clippy/clippy3.rs @@ -17,7 +17,8 @@ fn main() { ]; println!("My array! Here it is: {my_arr:?}"); - let my_empty_vec = vec![1, 2, 3, 4, 5].resize(0, 5); + let mut my_empty_vec = vec![1, 2, 3, 4, 5]; + my_empty_vec.resize(0, 5); println!("This Vec is empty, see? {my_empty_vec:?}"); let mut value_a = 45;