Implement Default for internal point types

This commit is contained in:
Henry de Valence 2017-11-21 15:53:40 -08:00
parent 9422804e13
commit 1d39d2ec6e

View file

@ -211,6 +211,12 @@ impl Identity for ProjectivePoint {
}
}
impl Default for ProjectivePoint {
fn default() -> ProjectivePoint {
ProjectivePoint::identity()
}
}
impl Identity for ProjectiveNielsPoint {
fn identity() -> ProjectiveNielsPoint {
ProjectiveNielsPoint{
@ -222,6 +228,12 @@ impl Identity for ProjectiveNielsPoint {
}
}
impl Default for ProjectiveNielsPoint {
fn default() -> ProjectiveNielsPoint {
ProjectiveNielsPoint::identity()
}
}
impl Identity for AffineNielsPoint {
fn identity() -> AffineNielsPoint {
AffineNielsPoint{
@ -232,6 +244,12 @@ impl Identity for AffineNielsPoint {
}
}
impl Default for AffineNielsPoint {
fn default() -> AffineNielsPoint {
AffineNielsPoint::identity()
}
}
// ------------------------------------------------------------------------
// Validity checks (for debugging, not CT)
// ------------------------------------------------------------------------