Skip to content

Commit 7cff72f

Browse files
committed
Use Uint::to_le_byte_array() directly
1 parent d67bfa0 commit 7cff72f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ed448-goldilocks/src/field/scalar.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -728,9 +728,7 @@ impl<C: CurveWithScalar> Scalar<C> {
728728

729729
/// Convert this `Scalar` to a little-endian byte array.
730730
pub fn to_bytes(&self) -> [u8; 56] {
731-
let bytes = self.scalar.to_le_bytes();
732-
let output: [u8; 56] = core::array::from_fn(|i| bytes[i]);
733-
output
731+
self.scalar.to_le_byte_array().0
734732
}
735733

736734
/// Invert this scalar

0 commit comments

Comments
 (0)