Skip to content

Commit 42685bb

Browse files
committed
errors: add sync marker to error cause
Errors cause should be shared to let anyhow to wrap it. Fixes: levex#7 Signed-off-by: bin liu <[email protected]>
1 parent d20e6a5 commit 42685bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub enum ErrorKind {
4545
#[derive(Debug)]
4646
pub struct Error {
4747
kind: ErrorKind,
48-
cause: Option<Box<StdError + Send>>,
48+
cause: Option<Box<StdError + Send + Sync>>,
4949
}
5050

5151
impl fmt::Display for Error {
@@ -88,7 +88,7 @@ impl Error {
8888

8989
pub(crate) fn with_cause<E>(kind: ErrorKind, cause: E) -> Self
9090
where
91-
E: 'static + Send + StdError,
91+
E: 'static + Send + Sync + StdError,
9292
{
9393
Self {
9494
kind,

0 commit comments

Comments
 (0)