chore: cleanup ECIESError (#6687)

This commit is contained in:
Dan Cline
2024-02-20 02:24:37 -05:00
committed by GitHub
parent e676f8cc2a
commit 5fe367801f

View File

@ -3,6 +3,7 @@ use std::fmt;
use thiserror::Error;
/// An error that occurs while reading or writing to an ECIES stream.
#[derive(Debug, Error)]
pub struct ECIESError {
inner: Box<ECIESErrorImpl>,
}
@ -14,24 +15,12 @@ impl ECIESError {
}
}
impl fmt::Debug for ECIESError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Debug::fmt(&*self.inner, f)
}
}
impl fmt::Display for ECIESError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Display::fmt(&*self.inner, f)
}
}
impl std::error::Error for ECIESError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
self.inner.source()
}
}
/// An error that occurs while reading or writing to an ECIES stream.
#[derive(Debug, Error)]
pub enum ECIESErrorImpl {