From 42685bbfe9c1abbfdba31c07b77479fd1fbb6cd8 Mon Sep 17 00:00:00 2001 From: bin liu Date: Mon, 14 Sep 2020 15:22:55 +0800 Subject: [PATCH] errors: add sync marker to error cause Errors cause should be shared to let anyhow to wrap it. Fixes: #7 Signed-off-by: bin liu --- src/error.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/error.rs b/src/error.rs index ff5549c..0e4f69c 100644 --- a/src/error.rs +++ b/src/error.rs @@ -45,7 +45,7 @@ pub enum ErrorKind { #[derive(Debug)] pub struct Error { kind: ErrorKind, - cause: Option>, + cause: Option>, } impl fmt::Display for Error { @@ -88,7 +88,7 @@ impl Error { pub(crate) fn with_cause(kind: ErrorKind, cause: E) -> Self where - E: 'static + Send + StdError, + E: 'static + Send + Sync + StdError, { Self { kind,