Skip to content

Commit

Permalink
refactor(dpapi): error type;
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBestTvarynka committed Jan 15, 2025
1 parent 839d823 commit ae80799
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/dpapi/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub enum Error {
#[error("invalid fragment (PDU) length: {0}")]
InvalidFragLength(u16),

#[error("invalid {0} magic bytes: expected: {1:?}, but got: {2:?}")]
#[error("invalid {0} magic bytes")]
InvalidMagicBytes(&'static str, &'static [u8], Vec<u8>),

#[error("unsupported protection descriptor: {0}")]
Expand All @@ -62,19 +62,19 @@ pub enum Error {
#[error("missing {0} value")]
MissingValue(&'static str),

#[error("can not parse integer: {0}")]
#[error(transparent)]
ParseInt(#[from] std::num::ParseIntError),

#[error("this error should never occur: {0}")]
Infallible(#[from] std::convert::Infallible),

#[error("ASN1: {0:?}")]
#[error(transparent)]
Asn1(#[from] picky_asn1_der::Asn1DerError),

#[error("faced characters that do not belong to the charset: {0:?}")]
#[error(transparent)]
CharSet(#[from] picky_asn1::restricted_string::CharSetError),

#[error("cannot create a string from UTF-16 bytes: {0:?}")]
#[error(transparent)]
FromUtf16(#[from] std::string::FromUtf16Error),
}

Expand Down

0 comments on commit ae80799

Please sign in to comment.