From 7b1cd7f211ba66192b98052c98efdb18c9a799d1 Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Mon, 17 Jul 2017 12:24:00 -0600 Subject: [PATCH] Improve documentation for errors a bit. --- src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 4813c1bfd..b88203706 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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.