Skip to content

Commit

Permalink
Merge pull request #44 from cpu/cpu-impl-err-for-hpkeerror
Browse files Browse the repository at this point in the history
lib: implement std::error::Error for HpkeError
  • Loading branch information
franziskuskiefer authored Nov 15, 2023
2 parents 8229546 + aa1cc82 commit 5797535
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ evercrypt_provider/target
rust_crypto_provider/target
traits/target/
.DS_Store
/.idea
8 changes: 8 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ pub enum HpkeError {
LockPoisoned,
}

impl std::error::Error for HpkeError {}

impl std::fmt::Display for HpkeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "HPKE Error: {:?}", self)
}
}

#[deprecated(
since = "0.0.7",
note = "Please use HpkePublicKey instead. This alias will be removed with the first stable 0.1 release."
Expand Down

0 comments on commit 5797535

Please sign in to comment.