Make state-res Error +Send

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-09-19 18:35:48 +00:00
parent 9900d06765
commit 5873bbd53e

View File

@ -26,11 +26,11 @@ pub enum Error {
/// A custom error.
#[error("{0}")]
Custom(Box<dyn std::error::Error>),
Custom(Box<dyn std::error::Error + Send>),
}
impl Error {
pub fn custom<E: std::error::Error + 'static>(e: E) -> Self {
pub fn custom<E: std::error::Error + Send + 'static>(e: E) -> Self {
Self::Custom(Box::new(e))
}
}