From 40b40d29b6d06ae18c40b829f77e9c43bcebd7af Mon Sep 17 00:00:00 2001 From: Chris Laplante Date: Fri, 25 Aug 2023 10:47:40 -0400 Subject: [PATCH] fix unnecessary vec! lint instances --- examples/cargo.rs | 2 +- src/iter.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/cargo.rs b/examples/cargo.rs index 02b18b21..1e2ff2e9 100644 --- a/examples/cargo.rs +++ b/examples/cargo.rs @@ -90,7 +90,7 @@ fn main() { let green_bold = Style::new().green().bold(); // do progress drawing in main thread - let mut processing = vec![None; NUM_CPUS]; + let mut processing = [None; NUM_CPUS]; while let Ok((n, krate)) = rx.recv() { processing[n] = krate; let crates: Vec<&str> = processing diff --git a/src/iter.rs b/src/iter.rs index 7393429b..3e73660f 100644 --- a/src/iter.rs +++ b/src/iter.rs @@ -334,7 +334,7 @@ mod test { #[test] fn it_can_wrap_an_iterator() { - let v = vec![1, 2, 3]; + let v = [1, 2, 3]; let wrap = |it: ProgressBarIter<_>| { assert_eq!(it.map(|x| x * 2).collect::>(), vec![2, 4, 6]); };