Improve documentation for errors a bit.

This commit is contained in:
Sean Bowe 2017-07-17 12:24:00 -06:00
parent 1d4710a39e
commit 7b1cd7f211
No known key found for this signature in database
GPG Key ID: 95684257D8F8B031

@ -366,9 +366,11 @@ pub trait PrimeFieldRepr: Sized +
fn mul2(&mut self);
}
/// An error that may occur when trying to interpret a `PrimeFieldRepr` as a
/// `PrimeField` element.
#[derive(Debug)]
pub enum PrimeFieldDecodingError {
// The encoded value is not in the field
/// The encoded value is not in the field
NotInField(String)
}
@ -390,6 +392,7 @@ impl fmt::Display for PrimeFieldDecodingError {
}
}
/// An error that may occur when trying to decode an `EncodedPoint`.
#[derive(Debug)]
pub enum GroupDecodingError {
/// The coordinate(s) do not lie on the curve.