use core::error::Error (#11317)

This commit is contained in:
Thomas Coratger
2024-09-29 18:47:48 +02:00
committed by GitHub
parent b8aeecae62
commit 55bf29e6d2
25 changed files with 90 additions and 101 deletions

View File

@ -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))
}