refactor: remove once_cell dependency and use std::sync equivalents (#4185)
This commit is contained in:
1 parent
1d954c2f6f
commit
3c3256ec02
22 files changed
+22
-47
No files matched your search
@@ -47,7 +47,6 @@ futures-util = { workspace = true }
|
||||
urlencoding = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
tao = { workspace = true, features = ["rwh_05"] }
|
||||
once_cell = { workspace = true }
|
||||
dioxus-history = { workspace = true }
|
||||
base64 = { workspace = true }
|
||||
libc = "0.2.170"
|
||||
|
||||
@@ -2,10 +2,9 @@
|
||||
///
|
||||
/// We want to acquire this mutex before doing anything with the virtualdom directly
|
||||
pub fn android_runtime_lock() -> std::sync::MutexGuard<'static, ()> {
|
||||
use once_cell::sync::OnceCell;
|
||||
use std::sync::Mutex;
|
||||
use std::sync::{Mutex, OnceLock};
|
||||
|
||||
static RUNTIME_LOCK: OnceCell<Mutex<()>> = OnceCell::new();
|
||||
static RUNTIME_LOCK: OnceLock<Mutex<()>> = OnceLock::new();
|
||||
|
||||
RUNTIME_LOCK.get_or_init(|| Mutex::new(())).lock().unwrap()
|
||||
}
|
||||
Reference in new issue
Block a user