interpreter: fix minor bug

unwrap_or is eagerly evaluated; we want unwrap_or_else which is lazily
evaluated.
This commit is contained in:
Alex Shelkovnykov 2023-12-17 12:18:09 -03:00
parent 190e926903
commit d0693218a1

View File

@ -908,10 +908,10 @@ pub fn interpret(context: &mut Context, mut subject: Noun, formula: Noun) -> Res
},
},
Err(error) => match error {
Error::Deterministic(trace) | Error::ScryCrashed(trace) => {
Error::Deterministic(_, trace) | Error::ScryCrashed(trace) => {
break Err(Error::ScryCrashed(trace));
}
Error::NonDeterministic(_) => {
Error::NonDeterministic(_, _) => {
break Err(error);
}
Error::ScryBlocked(_) => {