Skip to content

Commit

Permalink
Mark scalar::clamp_integer as must_use
Browse files Browse the repository at this point in the history
  • Loading branch information
moiseev-signal committed Aug 7, 2023
1 parent 345364d commit d32947f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions curve25519-dalek/src/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1240,6 +1240,7 @@ fn read_le_u64_into(src: &[u8], dst: &mut [u64]) {
///
/// See [here](https://neilmadden.blog/2020/05/28/whats-the-curve25519-clamping-all-about/) for
/// more details.
#[must_use]
pub const fn clamp_integer(mut bytes: [u8; 32]) -> [u8; 32] {
bytes[0] &= 0b1111_1000;
bytes[31] &= 0b0111_1111;
Expand Down

0 comments on commit d32947f

Please sign in to comment.