Skip to content

Commit

Permalink
remove unnecessary to_vec()
Browse files Browse the repository at this point in the history
  • Loading branch information
samkim-crypto committed Nov 5, 2024
1 parent 031e780 commit 622eb81
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions curves/bn254/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ mod target_arch {
.serialize_with_mode(&mut result_point_data[32..], Compress::No)
.map_err(|_| AltBn128Error::InvalidInputData)?;

Ok(convert_endianness_64(&result_point_data[..]).to_vec())
Ok(convert_endianness_64(&result_point_data[..]))
}

pub fn alt_bn128_multiplication(input: &[u8]) -> Result<Vec<u8>, AltBn128Error> {
Expand Down Expand Up @@ -301,10 +301,9 @@ mod target_arch {
.serialize_with_mode(&mut result_point_data[32..], Compress::No)
.map_err(|_| AltBn128Error::InvalidInputData)?;

Ok(
convert_endianness_64(&result_point_data[..ALT_BN128_MULTIPLICATION_OUTPUT_LEN])
.to_vec(),
)
Ok(convert_endianness_64(
&result_point_data[..ALT_BN128_MULTIPLICATION_OUTPUT_LEN],
))
}

pub fn alt_bn128_pairing(input: &[u8]) -> Result<Vec<u8>, AltBn128Error> {
Expand Down

0 comments on commit 622eb81

Please sign in to comment.