From 37c53c8a5a37ae912437ab0f2beae938b5b9e48a Mon Sep 17 00:00:00 2001 From: RyanSquared Date: Sun, 5 Nov 2023 14:27:19 -0600 Subject: openpgp: Make VerificationError implement std::error::Error - This allows the use of `Into::into(e)` in `VerificationHandler` to transform the error into an `anyhow::Error`. --- openpgp/src/parse/stream.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'openpgp') diff --git a/openpgp/src/parse/stream.rs b/openpgp/src/parse/stream.rs index 32f55362..46188fd0 100644 --- a/openpgp/src/parse/stream.rs +++ b/openpgp/src/parse/stream.rs @@ -317,6 +317,8 @@ impl<'a> std::fmt::Display for VerificationError<'a> { } } +impl<'a> std::error::Error for VerificationError<'a> {} + impl<'a> From> for Error { fn from(e: VerificationError<'a>) -> Self { use self::VerificationError::*; -- cgit v1.2.3