diff --git a/Cargo.lock b/Cargo.lock index 49daa770a..aee470eed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -109,7 +109,6 @@ dependencies = [ "accesskit", "accesskit_consumer", "hashbrown", - "once_cell", "parking_lot", "scopeguard", "static_assertions", diff --git a/platforms/windows/Cargo.toml b/platforms/windows/Cargo.toml index 0ca52ba53..25a1b9d24 100644 --- a/platforms/windows/Cargo.toml +++ b/platforms/windows/Cargo.toml @@ -38,7 +38,6 @@ features = [ ] [dev-dependencies] -once_cell = "1.13.0" parking_lot = "0.12.4" scopeguard = "1.1.0" winit = "0.30" diff --git a/platforms/windows/examples/hello_world.rs b/platforms/windows/examples/hello_world.rs index 817813640..ceded26a9 100644 --- a/platforms/windows/examples/hello_world.rs +++ b/platforms/windows/examples/hello_world.rs @@ -5,8 +5,7 @@ use accesskit::{ TreeId, TreeInfo, TreeUpdate, }; use accesskit_windows::Adapter; -use once_cell::sync::Lazy; -use std::cell::RefCell; +use std::{cell::RefCell, sync::LazyLock}; use windows::{ Win32::{ Foundation::*, @@ -17,7 +16,7 @@ use windows::{ core::*, }; -static WINDOW_CLASS_ATOM: Lazy = Lazy::new(|| { +static WINDOW_CLASS_ATOM: LazyLock = LazyLock::new(|| { let class_name = w!("AccessKitTest"); let wc = WNDCLASSW { diff --git a/platforms/windows/src/tests/mod.rs b/platforms/windows/src/tests/mod.rs index 10612da1b..ff939e487 100644 --- a/platforms/windows/src/tests/mod.rs +++ b/platforms/windows/src/tests/mod.rs @@ -4,10 +4,9 @@ // the LICENSE-MIT file), at your option. use accesskit::{ActionHandler, ActivationHandler}; -use once_cell::sync::Lazy; use std::{ cell::RefCell, - sync::{Arc, Condvar, Mutex}, + sync::{Arc, Condvar, LazyLock, Mutex}, thread, time::Duration, }; @@ -31,7 +30,7 @@ use super::{ const DEFAULT_TIMEOUT: Duration = Duration::from_secs(5); -static WINDOW_CLASS_ATOM: Lazy = Lazy::new(|| { +static WINDOW_CLASS_ATOM: LazyLock = LazyLock::new(|| { let class_name = w!("AccessKitTest"); let wc = WNDCLASSW { diff --git a/platforms/windows/src/tests/subclassed.rs b/platforms/windows/src/tests/subclassed.rs index ef9bbc5f8..ed485ee87 100644 --- a/platforms/windows/src/tests/subclassed.rs +++ b/platforms/windows/src/tests/subclassed.rs @@ -7,7 +7,7 @@ use accesskit::{ Action, ActionHandler, ActionRequest, ActivationHandler, Node, NodeId, Role, TreeId, TreeInfo, TreeUpdate, }; -use once_cell::sync::Lazy; +use std::sync::LazyLock; use windows::{ Win32::{ Foundation::*, @@ -119,7 +119,7 @@ extern "system" fn wndproc(window: HWND, message: u32, wparam: WPARAM, lparam: L unsafe { DefWindowProcW(window, message, wparam, lparam) } } -static WINDOW_CLASS_ATOM: Lazy = Lazy::new(|| { +static WINDOW_CLASS_ATOM: LazyLock = LazyLock::new(|| { let class_name = w!("AccessKitSubclassTest"); let wc = WNDCLASSW {