Allow sync in test.
This commit is contained in:
parent
b1452f4c35
commit
ab0ea87f9c
@ -2,7 +2,6 @@
|
|||||||
use rhai::{Engine, EvalAltResult, FnNamespace, Module, ParseErrorType, Shared, INT};
|
use rhai::{Engine, EvalAltResult, FnNamespace, Module, ParseErrorType, Shared, INT};
|
||||||
|
|
||||||
#[cfg(not(feature = "no_object"))]
|
#[cfg(not(feature = "no_object"))]
|
||||||
#[cfg(not(feature = "sync"))]
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_functions_trait_object() -> Result<(), Box<EvalAltResult>> {
|
fn test_functions_trait_object() -> Result<(), Box<EvalAltResult>> {
|
||||||
trait TestTrait {
|
trait TestTrait {
|
||||||
@ -18,8 +17,12 @@ fn test_functions_trait_object() -> Result<(), Box<EvalAltResult>> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(feature = "sync"))]
|
||||||
type MySharedTestTrait = Shared<dyn TestTrait>;
|
type MySharedTestTrait = Shared<dyn TestTrait>;
|
||||||
|
|
||||||
|
#[cfg(feature = "sync")]
|
||||||
|
type MySharedTestTrait = Shared<dyn TestTrait + Send + Sync>;
|
||||||
|
|
||||||
let mut engine = Engine::new();
|
let mut engine = Engine::new();
|
||||||
|
|
||||||
engine
|
engine
|
||||||
|
Loading…
Reference in New Issue
Block a user