mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-12-28 06:49:19 +00:00
fix(clippy3): separate initialisation and resizing of vec to get intended clippy advice
This commit is contained in:
parent
f80fbca12e
commit
271fc414e8
@ -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 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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user