diff options
Diffstat (limited to 'tvix')
-rw-r--r-- | tvix/eval/src/value/thunk.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tvix/eval/src/value/thunk.rs b/tvix/eval/src/value/thunk.rs index 59fe55cec945..e3f7846125f9 100644 --- a/tvix/eval/src/value/thunk.rs +++ b/tvix/eval/src/value/thunk.rs @@ -137,8 +137,12 @@ impl UpvalueCarrier for Thunk { impl Display for Thunk { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match &*self.0.borrow() { - ThunkRepr::Evaluated(v) => v.fmt(f), + match self.0.try_borrow() { + Ok(repr) => match &*repr { + ThunkRepr::Evaluated(v) => v.fmt(f), + _ => f.write_str("internal[thunk]"), + }, + _ => f.write_str("internal[thunk]"), } } |