Merge pull request #8 from liubin/fix/7-add-sync-marker-to-error-cause

errors: add sync marker to error cause
This commit is contained in:
Peng Tao
2020-09-14 16:15:12 +08:00
committed by GitHub

View File

@@ -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 {
@@ -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,