Skip to content

Commit

Permalink
vec without capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
Achim Schneider committed Mar 19, 2023
1 parent b85de86 commit 2b1cd00
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions primitives/arkworks/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ where
T: CanonicalDeserialize + Sized,
{
let mut cursor = Cursor::new(bytes.to_vec());
let length = bytes.len() / 8;
let mut result = Vec::with_capacity(length as usize);
let mut result = Vec::new();
for _ in 0..length {
result.push(T::deserialize_uncompressed_unchecked(&mut cursor)?);
}
Expand Down

0 comments on commit 2b1cd00

Please sign in to comment.