From 9dcc2d83e3c3ed9c7702d7a978150b3f04854165 Mon Sep 17 00:00:00 2001 From: Tad Hardesty Date: Mon, 12 Mar 2018 23:37:05 -0700 Subject: [PATCH] Make RenderPass Sync and DMError Send --- src/dreammaker/error.rs | 6 +++--- src/tools/render_passes/mod.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dreammaker/error.rs b/src/dreammaker/error.rs index 931f71e2..3fabfbc1 100644 --- a/src/dreammaker/error.rs +++ b/src/dreammaker/error.rs @@ -148,7 +148,7 @@ pub struct DMError { location: Location, severity: Severity, desc: String, - cause: Option>, + cause: Option>, } #[allow(unused_variables)] @@ -162,7 +162,7 @@ impl DMError { } } - pub fn set_cause(mut self, cause: E) -> DMError { + pub fn set_cause(mut self, cause: E) -> DMError { self.cause = Some(Box::new(cause)); self } @@ -211,6 +211,6 @@ impl error::Error for DMError { } fn cause(&self) -> Option<&error::Error> { - self.cause.as_ref().map(|x| &**x) + self.cause.as_ref().map(|x| &**x as &error::Error) } } diff --git a/src/tools/render_passes/mod.rs b/src/tools/render_passes/mod.rs index be66fa61..ce0f7322 100644 --- a/src/tools/render_passes/mod.rs +++ b/src/tools/render_passes/mod.rs @@ -11,7 +11,7 @@ pub mod structures; /// These methods are applied to any given atom in roughly the order they /// appear here. #[allow(unused_variables)] -pub trait RenderPass { +pub trait RenderPass: Sync { /// Filter atoms based solely on their typepath. fn path_filter(&self, path: &str,