mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-06 20:41:14 +00:00
Run rustfmt on src/errors.rs.
This commit is contained in:
parent
811793ba2b
commit
ad49d31bbc
1 changed files with 6 additions and 3 deletions
|
|
@ -19,7 +19,7 @@ use core::fmt::Display;
|
||||||
/// Internal errors. Most application-level developers will likely not
|
/// Internal errors. Most application-level developers will likely not
|
||||||
/// need to pay any attention to these.
|
/// need to pay any attention to these.
|
||||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
|
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
|
||||||
pub (crate) enum InternalError {
|
pub(crate) enum InternalError {
|
||||||
PointDecompressionError,
|
PointDecompressionError,
|
||||||
ScalarFormatError,
|
ScalarFormatError,
|
||||||
/// An error in the length of bytes handed to a constructor.
|
/// 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
|
/// 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
|
/// returning the error, and the `length` in bytes which its constructor
|
||||||
/// expects.
|
/// expects.
|
||||||
BytesLengthError{ name: &'static str, length: usize },
|
BytesLengthError {
|
||||||
|
name: &'static str,
|
||||||
|
length: usize,
|
||||||
|
},
|
||||||
/// The verification equation wasn't satisfied
|
/// The verification equation wasn't satisfied
|
||||||
VerifyError,
|
VerifyError,
|
||||||
}
|
}
|
||||||
|
|
@ -64,7 +67,7 @@ impl ::failure::Fail for InternalError {}
|
||||||
///
|
///
|
||||||
/// * Failure of a signature to satisfy the verification equation.
|
/// * Failure of a signature to satisfy the verification equation.
|
||||||
#[derive(Clone, Copy, Eq, PartialEq, Hash, Debug)]
|
#[derive(Clone, Copy, Eq, PartialEq, Hash, Debug)]
|
||||||
pub struct SignatureError(pub (crate) InternalError);
|
pub struct SignatureError(pub(crate) InternalError);
|
||||||
|
|
||||||
impl Display for SignatureError {
|
impl Display for SignatureError {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue