about summary refs log tree commit diff
path: root/tvix/eval/src/value/thunk.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-02-26T15·25+0300
committertazjin <tazjin@tvl.su>2023-03-04T15·18+0000
commitdccbda596067a7650eeeec96433b715909ba43b8 (patch)
tree57283fc205393b942e5f4d06d2c96e80c52c956f /tvix/eval/src/value/thunk.rs
parent8c7d5b4f87e9394dd3acff830e99bce0303b34e6 (diff)
fix(tvix/eval): ThunkSet does not need mutable pointers r/5885
Change-Id: Iea248870a0ea5d38cb02ff059c968fbd563570b6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8143
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/value/thunk.rs')
-rw-r--r--tvix/eval/src/value/thunk.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/eval/src/value/thunk.rs b/tvix/eval/src/value/thunk.rs
index 560e33244da3..1be3370b2377 100644
--- a/tvix/eval/src/value/thunk.rs
+++ b/tvix/eval/src/value/thunk.rs
@@ -478,13 +478,13 @@ impl Serialize for Thunk {
 /// The inner `HashSet` is not available on the outside, as it would be
 /// potentially unsafe to interact with the pointers in the set.
 #[derive(Default)]
-pub struct ThunkSet(HashSet<*mut ThunkRepr>);
+pub struct ThunkSet(HashSet<*const ThunkRepr>);
 
 impl ThunkSet {
     /// Check whether the given thunk has already been seen. Will mark the thunk
     /// as seen otherwise.
     pub fn insert(&mut self, thunk: &Thunk) -> bool {
-        let ptr: *mut ThunkRepr = thunk.0.as_ptr();
+        let ptr: *const ThunkRepr = thunk.0.as_ptr();
         self.0.insert(ptr)
     }
 }