Skip to content

Commit 037fe48

Browse files
committed
x509-cert: builder: implement std::error::Error for Error
Without this, x509-cert::builder::Error can not be used in the pattern of Box<dyn Error>, which is pretty common. Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent 25910fe commit 037fe48

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

x509-cert/src/builder.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ pub enum Error {
3636
Signature(signature::Error),
3737
}
3838

39+
#[cfg(feature = "std")]
40+
impl std::error::Error for Error {}
41+
3942
impl fmt::Display for Error {
4043
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4144
match self {

0 commit comments

Comments
 (0)