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};
|
||||
|
||||
#[cfg(not(feature = "no_object"))]
|
||||
#[cfg(not(feature = "sync"))]
|
||||
#[test]
|
||||
fn test_functions_trait_object() -> Result<(), Box<EvalAltResult>> {
|
||||
trait TestTrait {
|
||||
@ -18,8 +17,12 @@ fn test_functions_trait_object() -> Result<(), Box<EvalAltResult>> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "sync"))]
|
||||
type MySharedTestTrait = Shared<dyn TestTrait>;
|
||||
|
||||
#[cfg(feature = "sync")]
|
||||
type MySharedTestTrait = Shared<dyn TestTrait + Send + Sync>;
|
||||
|
||||
let mut engine = Engine::new();
|
||||
|
||||
engine
|
||||
|
Loading…
Reference in New Issue
Block a user