mirror of
https://github.com/urbit/ares.git
synced 2024-11-22 15:08:54 +03:00
interpreter: fix minor bug
unwrap_or is eagerly evaluated; we want unwrap_or_else which is lazily evaluated.
This commit is contained in:
parent
190e926903
commit
d0693218a1
@ -908,10 +908,10 @@ pub fn interpret(context: &mut Context, mut subject: Noun, formula: Noun) -> Res
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Err(error) => match error {
|
Err(error) => match error {
|
||||||
Error::Deterministic(trace) | Error::ScryCrashed(trace) => {
|
Error::Deterministic(_, trace) | Error::ScryCrashed(trace) => {
|
||||||
break Err(Error::ScryCrashed(trace));
|
break Err(Error::ScryCrashed(trace));
|
||||||
}
|
}
|
||||||
Error::NonDeterministic(_) => {
|
Error::NonDeterministic(_, _) => {
|
||||||
break Err(error);
|
break Err(error);
|
||||||
}
|
}
|
||||||
Error::ScryBlocked(_) => {
|
Error::ScryBlocked(_) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user