diff --git a/circuit/types/group/src/helpers/from_x_coordinate.rs b/circuit/types/group/src/helpers/from_x_coordinate.rs index 42bb31352f..374549a940 100644 --- a/circuit/types/group/src/helpers/from_x_coordinate.rs +++ b/circuit/types/group/src/helpers/from_x_coordinate.rs @@ -72,7 +72,7 @@ impl Group { // to get around the issue that the subgroup order is not of Scalar 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)); }