Skip to content

Commit 0ebc33e

Browse files
committed
Use const thread local initialization.
This is newly documented but not new: rust-lang/rust#110620
1 parent cb59539 commit 0ebc33e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

all-is-cubes/src/save/conversion.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,9 @@ mod universe {
821821
/// TODO: Find an alternative not dependent on external state. Perhaps
822822
/// serde::DeserializeSeed will do, or if necessary we can modify URef to support
823823
/// modification after construction.
824-
static UREF_DESERIALIZATION_CONTEXT: RefCell<Option<DeContext>> = RefCell::new(None);
824+
static UREF_DESERIALIZATION_CONTEXT: RefCell<Option<DeContext>> = const {
825+
RefCell::new(None)
826+
};
825827
}
826828

827829
struct DeContext {

0 commit comments

Comments
 (0)