Use debug_assert.
This commit is contained in:
@@ -236,8 +236,7 @@ impl Engine {
|
||||
mut this_ptr: Option<&mut Dynamic>,
|
||||
expr: &Expr,
|
||||
) -> RhaiResult {
|
||||
// Coded this way for better branch prediction.
|
||||
// Popular branches are lifted out of the `match` statement into their own branches.
|
||||
self.track_operation(global, expr.position())?;
|
||||
|
||||
#[cfg(feature = "debugging")]
|
||||
let reset =
|
||||
@@ -245,8 +244,6 @@ impl Engine {
|
||||
#[cfg(feature = "debugging")]
|
||||
auto_restore! { global if Some(reset) => move |g| g.debugger_mut().reset_status(reset) }
|
||||
|
||||
self.track_operation(global, expr.position())?;
|
||||
|
||||
match expr {
|
||||
// Constants
|
||||
Expr::IntegerConstant(x, ..) => Ok((*x).into()),
|
||||
|
Reference in New Issue
Block a user