mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
use core::error::Error (#11317)
This commit is contained in:
@ -37,14 +37,14 @@ pub enum RethError {
|
||||
|
||||
/// Any other error.
|
||||
#[error(transparent)]
|
||||
Other(Box<dyn std::error::Error + Send + Sync>),
|
||||
Other(Box<dyn core::error::Error + Send + Sync>),
|
||||
}
|
||||
|
||||
impl RethError {
|
||||
/// Create a new `RethError` from a given error.
|
||||
pub fn other<E>(error: E) -> Self
|
||||
where
|
||||
E: std::error::Error + Send + Sync + 'static,
|
||||
E: core::error::Error + Send + Sync + 'static,
|
||||
{
|
||||
Self::Other(Box::new(error))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user