Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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