Skip to content

Commit

Permalink
errors: add sync marker to error cause
Browse files Browse the repository at this point in the history
Errors cause should be shared to let anyhow to wrap it.

Fixes: #7

Signed-off-by: bin liu <[email protected]>
  • Loading branch information
liubin committed Sep 14, 2020
1 parent d20e6a5 commit 42685bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub enum ErrorKind {
#[derive(Debug)]
pub struct Error {
kind: ErrorKind,
cause: Option<Box<StdError + Send>>,
cause: Option<Box<StdError + Send + Sync>>,
}

impl fmt::Display for Error {
Expand Down Expand Up @@ -88,7 +88,7 @@ impl Error {

pub(crate) fn with_cause<E>(kind: ErrorKind, cause: E) -> Self
where
E: 'static + Send + StdError,
E: 'static + Send + Sync + StdError,
{
Self {
kind,
Expand Down

0 comments on commit 42685bb

Please sign in to comment.