Skip to content

Commit

Permalink
Uses .into() for infallible conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo committed Nov 16, 2023
1 parent b4c652e commit 1bc4ff6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sdk/program/src/alt_bn128/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@ mod target_arch {
let result_point = p + q;

let mut result_point_data = [0u8; ALT_BN128_ADDITION_OUTPUT_LEN];
let result_point_affine: G1 = result_point
.try_into()
.map_err(|_| AltBn128Error::ProjectiveToG1Failed)?;
let result_point_affine: G1 = result_point.into();
result_point_affine
.x
.serialize_with_mode(&mut result_point_data[..32], Compress::No)
Expand Down

0 comments on commit 1bc4ff6

Please sign in to comment.