From ab0ea87f9c5126ee2644fcf356874abfb3234d49 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Sat, 3 Apr 2021 12:10:08 +0800 Subject: [PATCH] Allow sync in test. --- tests/functions.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/functions.rs b/tests/functions.rs index 16ea7253..e6b56245 100644 --- a/tests/functions.rs +++ b/tests/functions.rs @@ -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> { trait TestTrait { @@ -18,8 +17,12 @@ fn test_functions_trait_object() -> Result<(), Box> { } } + #[cfg(not(feature = "sync"))] type MySharedTestTrait = Shared; + #[cfg(feature = "sync")] + type MySharedTestTrait = Shared; + let mut engine = Engine::new(); engine