clippy: Uses .into() when .try_into() is infallible (#34119)

This commit is contained in:
Brooks 2023-11-16 15:28:49 -05:00 committed by GitHub
parent b4c652ef6c
commit 9a78924c4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -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)