Skip to content

Commit

Permalink
add Send+Sync back to Error only
Browse files Browse the repository at this point in the history
  • Loading branch information
yngrtc committed Jan 7, 2024
1 parent f9df8e5 commit 63c4bc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shared/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ pub enum Error {
impl Error {
pub fn from_std<T>(error: T) -> Self
where
T: std::error::Error + 'static,
T: std::error::Error + Send + Sync + 'static,
{
Error::Std(StdError(Box::new(error)))
}
Expand Down Expand Up @@ -1005,7 +1005,7 @@ impl From<io::Error> for Error {
/// By using `util::Error::from_std` we can preserve the underlying error (and stack trace!).
#[derive(Debug, Error)]
#[error("{0}")]
pub struct StdError(pub Box<dyn std::error::Error>);
pub struct StdError(pub Box<dyn std::error::Error + Send + Sync>);

impl PartialEq for StdError {
fn eq(&self, _: &Self) -> bool {
Expand Down

0 comments on commit 63c4bc7

Please sign in to comment.