@@ -447,12 +447,13 @@ impl IsHigh for Scalar {
447447}
448448
449449/// Example affine point type
450- #[ derive( Clone , Copy , Debug , Eq , PartialEq ) ]
450+ #[ derive( Clone , Copy , Default , Debug , Eq , PartialEq ) ]
451451pub enum AffinePoint {
452452 /// Result of fixed-based scalar multiplication.
453453 FixedBaseOutput ( Scalar ) ,
454454
455455 /// Identity.
456+ #[ default]
456457 Identity ,
457458
458459 /// Base point.
@@ -506,12 +507,6 @@ impl ConditionallySelectable for AffinePoint {
506507 }
507508}
508509
509- impl Default for AffinePoint {
510- fn default ( ) -> Self {
511- Self :: Identity
512- }
513- }
514-
515510impl DefaultIsZeroes for AffinePoint { }
516511
517512impl From < NonIdentity < AffinePoint > > for AffinePoint {
@@ -569,12 +564,13 @@ impl TryFrom<AffinePoint> for NonIdentity<AffinePoint> {
569564}
570565
571566/// Example projective point type
572- #[ derive( Clone , Copy , Debug , Eq , PartialEq ) ]
567+ #[ derive( Clone , Copy , Default , Debug , Eq , PartialEq ) ]
573568pub enum ProjectivePoint {
574569 /// Result of fixed-based scalar multiplication
575570 FixedBaseOutput ( Scalar ) ,
576571
577572 /// Is this point the identity point?
573+ #[ default]
578574 Identity ,
579575
580576 /// Is this point the generator point?
@@ -620,12 +616,6 @@ impl ConditionallySelectable for ProjectivePoint {
620616 }
621617}
622618
623- impl Default for ProjectivePoint {
624- fn default ( ) -> Self {
625- Self :: Identity
626- }
627- }
628-
629619impl DefaultIsZeroes for ProjectivePoint { }
630620
631621impl From < AffinePoint > for ProjectivePoint {
0 commit comments