Skip to content

Commit d131d74

Browse files
authored
Implement Mul<&NonZeroScalar> for NonIdentity (#1852)
1 parent 2744cdb commit d131d74

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

elliptic-curve/src/point/non_identity.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,18 @@ where
163163
}
164164
}
165165

166+
impl<C, P> Mul<&NonZeroScalar<C>> for NonIdentity<P>
167+
where
168+
C: CurveArithmetic,
169+
P: Copy + Mul<Scalar<C>, Output = P>,
170+
{
171+
type Output = NonIdentity<P>;
172+
173+
fn mul(self, rhs: &NonZeroScalar<C>) -> Self::Output {
174+
self * *rhs
175+
}
176+
}
177+
166178
impl<C, P> Mul<&NonZeroScalar<C>> for &NonIdentity<P>
167179
where
168180
C: CurveArithmetic,

0 commit comments

Comments
 (0)