Merge pull request #8 from pepyakin/error-sync-and-send
Make Error: Sync + Send
This commit is contained in:
commit
7828d8cc56
|
@ -34,7 +34,7 @@ impl<'a> RuntimeArgs<'a> {
|
|||
}
|
||||
|
||||
/// Custom user error.
|
||||
pub trait HostError: 'static + ::std::fmt::Display + ::std::fmt::Debug {
|
||||
pub trait HostError: 'static + ::std::fmt::Display + ::std::fmt::Debug + Send + Sync {
|
||||
#[doc(hidden)]
|
||||
fn __private_get_type_id__(&self) -> TypeId {
|
||||
TypeId::of::<Self>()
|
||||
|
|
|
@ -1,2 +1,15 @@
|
|||
mod host;
|
||||
mod wasm;
|
||||
|
||||
use super::Error;
|
||||
|
||||
fn assert_send<T: Send>() {}
|
||||
fn assert_sync<T: Sync>() {}
|
||||
fn assert_std_err_impl<T: ::std::error::Error>() {}
|
||||
|
||||
#[test]
|
||||
fn assert_error_properties() {
|
||||
assert_send::<Error>();
|
||||
assert_sync::<Error>();
|
||||
assert_std_err_impl::<Error>();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue