No point in initializing the vector, since it always gets truncated first

This commit is contained in:
Dirkjan Ochtman 2021-02-02 16:23:16 +01:00
parent 9c4c58e753
commit 93d4c8a656
1 changed files with 1 additions and 1 deletions

View File

@ -284,7 +284,7 @@ where
// For layers above the zero layer, make a copy of the current state of the zero layer
// with `nearest` truncated to `M` elements.
if layer.0 > 0 {
let mut upper = vec![UpperNode::default(); zero.len()];
let mut upper = Vec::new();
(&zero).into_par_iter()
.map(|zero| UpperNode::from_zero(&zero.read()))
.collect_into_vec(&mut upper);