Run rustfmt on src/errors.rs.

This commit is contained in:
Isis Lovecruft 2018-12-30 04:10:59 +00:00
parent 811793ba2b
commit ad49d31bbc
No known key found for this signature in database
GPG key ID: AB41313533E8E812

View file

@ -19,7 +19,7 @@ use core::fmt::Display;
/// Internal errors. Most application-level developers will likely not
/// need to pay any attention to these.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
pub (crate) enum InternalError {
pub(crate) enum InternalError {
PointDecompressionError,
ScalarFormatError,
/// An error in the length of bytes handed to a constructor.
@ -27,7 +27,10 @@ pub (crate) enum InternalError {
/// To use this, pass a string specifying the `name` of the type which is
/// returning the error, and the `length` in bytes which its constructor
/// expects.
BytesLengthError{ name: &'static str, length: usize },
BytesLengthError {
name: &'static str,
length: usize,
},
/// The verification equation wasn't satisfied
VerifyError,
}
@ -64,7 +67,7 @@ impl ::failure::Fail for InternalError {}
///
/// * Failure of a signature to satisfy the verification equation.
#[derive(Clone, Copy, Eq, PartialEq, Hash, Debug)]
pub struct SignatureError(pub (crate) InternalError);
pub struct SignatureError(pub(crate) InternalError);
impl Display for SignatureError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {