From 6ea98dd940361ad9232ec86f33b29c6318009c20 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 6 Jun 2023 22:06:24 +0200 Subject: Small refactorings --- src/eval/func.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/eval/func.rs') diff --git a/src/eval/func.rs b/src/eval/func.rs index 86070fc7..1745dfb1 100644 --- a/src/eval/func.rs +++ b/src/eval/func.rs @@ -7,7 +7,8 @@ use ecow::eco_format; use once_cell::sync::Lazy; use super::{ - cast, Args, CastInfo, Eval, Flow, IntoValue, Route, Scope, Scopes, Tracer, Value, Vm, + cast, Args, CastInfo, Eval, FlowEvent, IntoValue, Route, Scope, Scopes, Tracer, + Value, Vm, }; use crate::diag::{bail, SourceResult, StrResult}; use crate::model::{ElemFunc, Introspector, Locator, Vt}; @@ -404,8 +405,8 @@ impl Closure { // Handle control flow. let result = closure.body.eval(&mut vm); match vm.flow { - Some(Flow::Return(_, Some(explicit))) => return Ok(explicit), - Some(Flow::Return(_, None)) => {} + Some(FlowEvent::Return(_, Some(explicit))) => return Ok(explicit), + Some(FlowEvent::Return(_, None)) => {} Some(flow) => bail!(flow.forbidden()), None => {} } -- cgit v1.2.3