diff options
author | Vincent Ambo <mail@tazj.in> | 2022-09-13T13·17+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-09-13T14·41+0000 |
commit | 3e188d4f8e484019e1f04662cfaef4213e24ceed (patch) | |
tree | 1bd5520379a6898a535ffcd0e54dca490aab31c2 /tvix | |
parent | 6fdf55a9757905884ccb5eb09e862b9455bdce8b (diff) |
fix(tvix/eval): add branch for directly comparing two thunks r/4845
Pointed out by sterni in cl/6370 Change-Id: I324d8049a2702ced8f30ad43a64d63ae79dd0eab Reviewed-on: https://cl.tvl.fyi/c/depot/+/6569 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix')
-rw-r--r-- | tvix/eval/src/value/mod.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tvix/eval/src/value/mod.rs b/tvix/eval/src/value/mod.rs index 46ad65c5025e..6baa8b666ed6 100644 --- a/tvix/eval/src/value/mod.rs +++ b/tvix/eval/src/value/mod.rs @@ -169,6 +169,7 @@ impl PartialEq for Value { // compared instead. The compiler should ensure that // thunks under comparison have been forced, otherwise it // is a bug. + (Value::Thunk(lhs), Value::Thunk(rhs)) => &*lhs.value() == &*rhs.value(), (Value::Thunk(lhs), rhs) => &*lhs.value() == rhs, (lhs, Value::Thunk(rhs)) => lhs == &*rhs.value(), |