From 93d92133f93ee80548253786bcf61f2210064c33 Mon Sep 17 00:00:00 2001 From: daxpedda Date: Tue, 6 Jul 2021 14:33:13 +0200 Subject: [PATCH] Rustfmt --- src/group.rs | 8 ++++++-- src/map_to_curve.rs | 4 +--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/group.rs b/src/group.rs index 00203b9..6e59b89 100644 --- a/src/group.rs +++ b/src/group.rs @@ -58,7 +58,9 @@ pub trait Group: Copy + Sized + for<'a> Mul<&'a ::Scalar, Output type UniformBytesLen: ArrayLength; /// Hashes a slice of pseudo-random bytes of the correct length to a curve point - fn hash_to_curve(uniform_bytes: &GenericArray) -> Result; + fn hash_to_curve( + uniform_bytes: &GenericArray, + ) -> Result; /// Get the base point for the group fn base_point() -> Self; @@ -128,7 +130,9 @@ impl Group for RistrettoPoint { } type UniformBytesLen = U64; - fn hash_to_curve(uniform_bytes: &GenericArray) -> Result { + fn hash_to_curve( + uniform_bytes: &GenericArray, + ) -> Result { // https://caniuse.rs/features/array_gt_32_impls let bits: [u8; 64] = { let mut bytes = [0u8; 64]; diff --git a/src/map_to_curve.rs b/src/map_to_curve.rs index 04e0bdf..7bbb40a 100644 --- a/src/map_to_curve.rs +++ b/src/map_to_curve.rs @@ -43,9 +43,7 @@ impl GroupWithMapToCurve for RistrettoPoint { fn map_to_curve(msg: &[u8], dst: &[u8]) -> Result { let uniform_bytes = expand_message_xmd::(msg, dst, ::OutputSize::to_usize())?; - ::hash_to_curve( - &GenericArray::clone_from_slice(&uniform_bytes[..]), - ) + ::hash_to_curve(&GenericArray::clone_from_slice(&uniform_bytes[..])) } fn hash_to_scalar(