Skip to content

Commit

Permalink
solve mutability issue
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurpaulino committed Aug 4, 2023
1 parent b15aadf commit 6b11ee8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1412,8 +1412,10 @@ impl<F: LurkField> Store<F> {
}

fn ensure_constants(&mut self) {
// This will clobber whatever was there before.
let _ = self.constants.set(NamedConstants::new(self));
if self.constants.get().is_none() {
let new = NamedConstants::new(self);
self.constants.set(new).expect("constants are not set");
}
}

/// The only places that `ZPtr`s for `Ptr`s should be created, to
Expand Down

0 comments on commit 6b11ee8

Please sign in to comment.