Remove must_use spam

This commit is contained in:
Luke Parker
2023-07-08 01:06:38 -04:00
parent f93106af6b
commit 286e96ccd8
11 changed files with 0 additions and 27 deletions

View File

@@ -217,7 +217,6 @@ impl PrimeFieldBits for FieldElement {
impl FieldElement {
/// Interpret the value as a little-endian integer, square it, and reduce it into a FieldElement.
#[must_use]
pub fn from_square(value: [u8; 32]) -> Self {
let value = U256::from_le_bytes(value);
Self(reduce(U512::from(value.mul_wide(&value))))
@@ -259,7 +258,6 @@ impl FieldElement {
/// The result is only a valid square root if the Choice is true.
/// RFC 8032 simply fails if there isn't a square root, leaving any return value undefined.
/// Ristretto explicitly returns 0 or sqrt((SQRT_M1 * u) / v).
#[must_use]
pub fn sqrt_ratio_i(u: Self, v: Self) -> (Choice, Self) {
let i = SQRT_M1;

View File

@@ -223,13 +223,11 @@ impl Scalar {
}
/// Perform wide reduction on a 64-byte array to create a Scalar without bias.
#[must_use]
pub fn from_bytes_mod_order_wide(bytes: &[u8; 64]) -> Self {
Self(DScalar::from_bytes_mod_order_wide(bytes))
}
/// Derive a Scalar without bias from a digest via wide reduction.
#[must_use]
pub fn from_hash<D: Digest<OutputSize = U64> + HashMarker>(hash: D) -> Self {
let mut output = [0u8; 64];
output.copy_from_slice(&hash.finalize());