Skip to content

Commit

Permalink
Use Vec::with_capacity().
Browse files Browse the repository at this point in the history
  • Loading branch information
acoglio committed Dec 27, 2023
1 parent e4886be commit b4e1b09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion circuit/types/group/src/helpers/from_x_coordinate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl<E: Environment> Group<E> {
// to get around the issue that the subgroup order is not of Scalar<E> type.
let order = E::ScalarField::modulus();
let order_bits_be = order.to_bits_be();
let mut order_bits_be_constants = Vec::new();
let mut order_bits_be_constants = Vec::with_capacity(order_bits_be.len());
for bit in order_bits_be.iter() {
order_bits_be_constants.push(Boolean::constant(*bit));
}
Expand Down

0 comments on commit b4e1b09

Please sign in to comment.