Skip to content

Commit 48f2f53

Browse files
committed
Depend on ProjectivePoint: ToEncodedPoint
1 parent c8de516 commit 48f2f53

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/group/elliptic_curve.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use crate::{Error, InternalError, Result};
2323
impl<C> Group for C
2424
where
2525
C: GroupDigest,
26-
ProjectivePoint<Self>: CofactorGroup,
26+
ProjectivePoint<Self>: CofactorGroup + ToEncodedPoint<Self>,
2727
FieldSize<Self>: ModulusSize,
2828
AffinePoint<Self>: FromEncodedPoint<Self> + ToEncodedPoint<Self>,
2929
Scalar<Self>: FromOkm,
@@ -65,8 +65,7 @@ where
6565
}
6666

6767
fn serialize_elem(elem: Self::Elem) -> GenericArray<u8, Self::ElemLen> {
68-
let affine: AffinePoint<Self> = elem.into();
69-
let bytes = affine.to_encoded_point(true);
68+
let bytes = elem.to_encoded_point(true);
7069
let bytes = bytes.as_bytes();
7170
let mut result = GenericArray::default();
7271
result[..bytes.len()].copy_from_slice(bytes);

0 commit comments

Comments
 (0)