From: Bennet Bleßmann Date: Sat, 6 Jul 2024 00:24:26 +0000 (+0200) Subject: remove rust_beta_channel feature X-Git-Tag: v0.10.0~127^2~38 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=91253917b4c6d37a0185a7500de90ab725ca006a;p=scryer-prolog.git remove rust_beta_channel feature - the msrv (i.e. rust-version in Cargo.toml) is high enough that all gated code can now be used on stabe --- diff --git a/Cargo.toml b/Cargo.toml index 6753ee01..3fe35772 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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] diff --git a/src/arena.rs b/src/arena.rs index b9f2ae78..07a144eb 100644 --- a/src/arena.rs +++ b/src/arena.rs @@ -56,19 +56,8 @@ const F64_TABLE_ALIGN: usize = 8; #[inline(always)] fn global_f64table() -> &'static RwLock> { - #[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> = RwLock::const_new(Weak::new()); - &GLOBAL_ATOM_TABLE - } - #[cfg(not(feature = "rust_beta_channel"))] - { - use std::sync::OnceLock; - static GLOBAL_ATOM_TABLE: OnceLock>> = OnceLock::new(); - GLOBAL_ATOM_TABLE.get_or_init(|| RwLock::new(Weak::new())) - } + static GLOBAL_ATOM_TABLE: RwLock> = RwLock::new(Weak::new()); + &GLOBAL_ATOM_TABLE } impl RawBlockTraits for F64Table { diff --git a/src/atom_table.rs b/src/atom_table.rs index f29e40bf..0f8c4951 100644 --- a/src/atom_table.rs +++ b/src/atom_table.rs @@ -56,19 +56,8 @@ const ATOM_TABLE_ALIGN: usize = 8; #[inline(always)] fn global_atom_table() -> &'static RwLock> { - #[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> = RwLock::const_new(Weak::new()); - &GLOBAL_ATOM_TABLE - } - #[cfg(not(feature = "rust_beta_channel"))] - { - use std::sync::OnceLock; - static GLOBAL_ATOM_TABLE: OnceLock>> = OnceLock::new(); - GLOBAL_ATOM_TABLE.get_or_init(|| RwLock::new(Weak::new())) - } + static GLOBAL_ATOM_TABLE: RwLock> = RwLock::new(Weak::new()); + &GLOBAL_ATOM_TABLE } #[inline(always)]