Make RenderPass Sync and DMError Send

This commit is contained in:
Tad Hardesty 2018-03-12 23:37:05 -07:00
parent 912cc7730f
commit 9dcc2d83e3
2 changed files with 4 additions and 4 deletions

View file

@ -148,7 +148,7 @@ pub struct DMError {
location: Location,
severity: Severity,
desc: String,
cause: Option<Box<error::Error>>,
cause: Option<Box<error::Error + Send>>,
}
#[allow(unused_variables)]
@ -162,7 +162,7 @@ impl DMError {
}
}
pub fn set_cause<E: error::Error + 'static>(mut self, cause: E) -> DMError {
pub fn set_cause<E: error::Error + Send + 'static>(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)
}
}

View file

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