]> Repositorios git - scryer-prolog.git/commitdiff
fix `rust_beta_channel` feature
authorSkgland <[email protected]>
Sun, 27 Aug 2023 20:23:22 +0000 (22:23 +0200)
committerBennet Bleßmann <[email protected]>
Tue, 5 Sep 2023 17:12:23 +0000 (19:12 +0200)
src/atom_table.rs

index c27773af16982fbf6c0d3d5a82146b5beb7c9208..523d897408800294a3d0339e662f8cce7ae7571f 100644 (file)
@@ -60,7 +60,7 @@ fn global_atom_table() -> &'static RwLock<Weak<RwLock<AtomTable>>> {
     {
         // const Weak::new will be stabilized in 1.73 which is currently in beta,
         // till then we need a OnceLock for initialization
-        static GLOBAL_ATOM_TABLE: RwLock<Weak<RwLock<AtomTable>>> = RwLock::new(Weak::new());
+        static GLOBAL_ATOM_TABLE: RwLock<Weak<RwLock<AtomTable>>> = RwLock::const_new(Weak::new());
         &GLOBAL_ATOM_TABLE
     }
     #[cfg(not(feature = "rust_beta_channel"))]