Use debug_assert!.

This commit is contained in:
Stephen Chung
2023-02-12 00:13:54 +08:00
parent 8685323b15
commit 9f18d6519d
5 changed files with 6 additions and 6 deletions

View File

@@ -363,7 +363,7 @@ impl Engine {
);
if let Some(FnResolutionCacheEntry { func, source }) = func {
assert!(func.is_native());
debug_assert!(func.is_native());
// Push a new call stack frame
#[cfg(feature = "debugging")]
@@ -633,7 +633,7 @@ impl Engine {
.cloned()
{
// Script function call
assert!(func.is_script());
debug_assert!(func.is_script());
let f = func.get_script_fn_def().expect("script-defined function");
let environ = func.get_encapsulated_environ();