Fix internals build.

This commit is contained in:
Stephen Chung 2021-03-08 15:55:26 +08:00
parent 62928f8613
commit 57140cbeeb
3 changed files with 3 additions and 7 deletions

View File

@ -1168,14 +1168,14 @@ pub struct FnCallExpr {
pub hash: FnHash, pub hash: FnHash,
/// Does this function call capture the parent scope? /// Does this function call capture the parent scope?
pub capture: bool, pub capture: bool,
/// List of function call arguments.
pub args: StaticVec<Expr>,
/// Namespace of the function, if any. Boxed because it occurs rarely. /// Namespace of the function, if any. Boxed because it occurs rarely.
pub namespace: Option<NamespaceRef>, pub namespace: Option<NamespaceRef>,
/// Function name. /// Function name.
/// Use [`Cow<'static, str>`][Cow] because a lot of operators (e.g. `==`, `>=`) are implemented as /// Use [`Cow<'static, str>`][Cow] because a lot of operators (e.g. `==`, `>=`) are implemented as
/// function calls and the function names are predictable, so no need to allocate a new [`String`]. /// function calls and the function names are predictable, so no need to allocate a new [`String`].
pub name: Cow<'static, str>, pub name: Cow<'static, str>,
/// List of function call arguments.
pub args: StaticVec<Expr>,
} }
/// A type that wraps a [`FLOAT`] and implements [`Hash`]. /// A type that wraps a [`FLOAT`] and implements [`Hash`].

View File

@ -141,10 +141,6 @@ pub use fn_native::Shared;
#[cfg(not(feature = "no_closure"))] #[cfg(not(feature = "no_closure"))]
use fn_native::Locked; use fn_native::Locked;
#[cfg(feature = "internals")]
pub use utils::{calc_fn_hash, calc_fn_params_hash, combine_hashes, HashableHashMap};
#[cfg(not(feature = "internals"))]
pub(crate) use utils::{calc_fn_hash, calc_fn_params_hash, combine_hashes}; pub(crate) use utils::{calc_fn_hash, calc_fn_params_hash, combine_hashes};
pub use rhai_codegen::*; pub use rhai_codegen::*;

View File

@ -1,4 +1,4 @@
use rhai::{Engine, EvalAltResult, INT}; use rhai::{Engine, EvalAltResult, INT};
#[test] #[test]
fn test_left_shift() -> Result<(), Box<EvalAltResult>> { fn test_left_shift() -> Result<(), Box<EvalAltResult>> {