]> Repositorios git - scryer-prolog.git/commitdiff
remove rust_beta_channel feature
authorBennet Bleßmann <[email protected]>
Sat, 6 Jul 2024 00:24:26 +0000 (02:24 +0200)
committerBennet Bleßmann <[email protected]>
Sat, 6 Jul 2024 00:24:26 +0000 (02:24 +0200)
- the msrv (i.e. rust-version in Cargo.toml) is high enough that all gated code can now be used on stabe

Cargo.toml
src/arena.rs
src/atom_table.rs

index 6753ee013e26bec88e8b401cffbd722662795052..3fe3577280b9714afd09e1854de78e14c07cdc6e 100644 (file)
@@ -22,7 +22,6 @@ repl = ["dep:crossterm", "dep:ctrlc", "dep:rustyline"]
 hostname = ["dep:hostname"]
 tls = ["dep:native-tls"]
 http = ["dep:warp", "dep:reqwest"]
-rust_beta_channel = []
 crypto-full = []
 
 [build-dependencies]
index b9f2ae78005af31f426dd8e0f9440b586fbe011d..07a144ebdc9e23dccfaa42f12eb3b0ebdaa08ccc 100644 (file)
@@ -56,19 +56,8 @@ const F64_TABLE_ALIGN: usize = 8;
 
 #[inline(always)]
 fn global_f64table() -> &'static RwLock<Weak<F64Table>> {
-    #[cfg(feature = "rust_beta_channel")]
-    {
-        // 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<F64Table>> = RwLock::const_new(Weak::new());
-        &GLOBAL_ATOM_TABLE
-    }
-    #[cfg(not(feature = "rust_beta_channel"))]
-    {
-        use std::sync::OnceLock;
-        static GLOBAL_ATOM_TABLE: OnceLock<RwLock<Weak<F64Table>>> = OnceLock::new();
-        GLOBAL_ATOM_TABLE.get_or_init(|| RwLock::new(Weak::new()))
-    }
+    static GLOBAL_ATOM_TABLE: RwLock<Weak<F64Table>> = RwLock::new(Weak::new());
+    &GLOBAL_ATOM_TABLE
 }
 
 impl RawBlockTraits for F64Table {
index f29e40bffcfbbb2885739d8764e88aa01ffc7657..0f8c4951347574e746bb49c69936f92b71a792fe 100644 (file)
@@ -56,19 +56,8 @@ const ATOM_TABLE_ALIGN: usize = 8;
 
 #[inline(always)]
 fn global_atom_table() -> &'static RwLock<Weak<AtomTable>> {
-    #[cfg(feature = "rust_beta_channel")]
-    {
-        // 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<AtomTable>> = RwLock::const_new(Weak::new());
-        &GLOBAL_ATOM_TABLE
-    }
-    #[cfg(not(feature = "rust_beta_channel"))]
-    {
-        use std::sync::OnceLock;
-        static GLOBAL_ATOM_TABLE: OnceLock<RwLock<Weak<AtomTable>>> = OnceLock::new();
-        GLOBAL_ATOM_TABLE.get_or_init(|| RwLock::new(Weak::new()))
-    }
+    static GLOBAL_ATOM_TABLE: RwLock<Weak<AtomTable>> = RwLock::new(Weak::new());
+    &GLOBAL_ATOM_TABLE
 }
 
 #[inline(always)]