mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: cleanup ECIESError (#6687)
This commit is contained in:
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user