diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-06-06 22:06:24 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-06-06 22:25:55 +0200 |
| commit | 6ea98dd940361ad9232ec86f33b29c6318009c20 (patch) | |
| tree | a350e0380c7403969ced255e4e55c04d83bcaff8 /src/eval/func.rs | |
| parent | fd417da04f7ca4b995de7f6510abafd3e9c31307 (diff) | |
Small refactorings
Diffstat (limited to 'src/eval/func.rs')
| -rw-r--r-- | src/eval/func.rs | 7 |
1 files changed, 4 insertions, 3 deletions
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 => {} } |
