mirror of
https://github.com/kata-containers/cgroups-rs.git
synced 2026-08-05 02:13:23 +00:00
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 <bin@hyper.sh>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user