Remove unnecessary if statement

This commit is contained in:
Henry de Valence 2017-04-02 23:14:19 +02:00
parent 73e172484c
commit e74bf8e789

View file

@ -947,13 +947,7 @@ impl ExtendedPoint {
/// ///
/// True if it is of small order; false otherwise. /// True if it is of small order; false otherwise.
pub fn is_small_order(&self) -> bool { pub fn is_small_order(&self) -> bool {
let p8: ExtendedPoint = self.mult_by_pow_2(3); self.mult_by_cofactor().is_identity()
if p8.is_identity() {
return true;
} else {
return false;
}
} }
} }