Fix builds.
This commit is contained in:
parent
b089d5b8f4
commit
f7ad1cec39
@ -1,6 +1,4 @@
|
|||||||
use rhai::{
|
use rhai::{Dynamic, Engine, EvalAltResult, Module, Scope, AST};
|
||||||
module_resolvers::FileModuleResolver, Dynamic, Engine, EvalAltResult, Module, Scope, AST,
|
|
||||||
};
|
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
env,
|
env,
|
||||||
@ -143,7 +141,7 @@ fn main() {
|
|||||||
// Set a file module resolver without caching
|
// Set a file module resolver without caching
|
||||||
#[cfg(not(feature = "no_module"))]
|
#[cfg(not(feature = "no_module"))]
|
||||||
{
|
{
|
||||||
let mut resolver = FileModuleResolver::new();
|
let mut resolver = rhai::module_resolvers::FileModuleResolver::new();
|
||||||
resolver.enable_cache(false);
|
resolver.enable_cache(false);
|
||||||
engine.set_module_resolver(resolver);
|
engine.set_module_resolver(resolver);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#![cfg(not(feature = "no_function"))]
|
#![cfg(not(feature = "no_function"))]
|
||||||
use rhai::{Engine, EvalAltResult, FnNamespace, Module, ParseErrorType, Shared, INT};
|
use rhai::{Engine, EvalAltResult, FnNamespace, Module, ParseErrorType, Shared, INT};
|
||||||
|
|
||||||
|
#[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 {
|
||||||
|
@ -222,6 +222,7 @@ fn test_string_substring() -> Result<(), Box<EvalAltResult>> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(feature = "no_object"))]
|
||||||
#[test]
|
#[test]
|
||||||
fn test_string_format() -> Result<(), Box<EvalAltResult>> {
|
fn test_string_format() -> Result<(), Box<EvalAltResult>> {
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
Loading…
Reference in New Issue
Block a user