Skip to content

Commit

Permalink
remove new use of vec! from develop branch
Browse files Browse the repository at this point in the history
  • Loading branch information
xoloki committed Aug 2, 2019
1 parent f248649 commit c664af1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pub fn add_vec(a: &[Scalar], b: &[Scalar]) -> Vec<Scalar> {
// throw some error
//println!("lengths of vectors don't match for vector addition");
}
let mut out = vec![Scalar::zero(); b.len()];
let mut out: Vec<Scalar> = (0..b.len()).map(|_| Scalar::zero()).collect();
for i in 0..a.len() {
out[i] = a[i] + b[i];
}
Expand Down

0 comments on commit c664af1

Please sign in to comment.