From 91253917b4c6d37a0185a7500de90ab725ca006a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bennet=20Ble=C3=9Fmann?= Date: Sat, 6 Jul 2024 02:24:26 +0200 Subject: [PATCH] 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 --- Cargo.toml | 1 - src/arena.rs | 15 ++------------- src/atom_table.rs | 15 ++------------- 3 files changed, 4 insertions(+), 27 deletions(-) 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)] -- 2.54.0