mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 12:55:47 +02:00
Drop once_cell
dependency (#14198)
This PR drops the `once_cell` dependency from all Nu crates, replacing uses of the [`Lazy`](https://docs.rs/once_cell/latest/once_cell/sync/struct.Lazy.html) type with its `std` equivalent, [`LazyLock`](https://doc.rust-lang.org/std/sync/struct.LazyLock.html).
This commit is contained in:
@ -8,7 +8,6 @@ use libc::c_void;
|
||||
use ntapi::ntrtl::RTL_USER_PROCESS_PARAMETERS;
|
||||
use ntapi::ntwow64::{PEB32, RTL_USER_PROCESS_PARAMETERS32};
|
||||
|
||||
use once_cell::sync::Lazy;
|
||||
use std::cell::RefCell;
|
||||
use std::collections::HashMap;
|
||||
use std::ffi::OsString;
|
||||
@ -17,6 +16,7 @@ use std::os::windows::ffi::OsStringExt;
|
||||
use std::path::PathBuf;
|
||||
use std::ptr;
|
||||
use std::ptr::null_mut;
|
||||
use std::sync::LazyLock;
|
||||
use std::thread;
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
@ -694,7 +694,7 @@ unsafe fn get_process_params(
|
||||
))
|
||||
}
|
||||
|
||||
static WINDOWS_8_1_OR_NEWER: Lazy<bool> = Lazy::new(|| unsafe {
|
||||
static WINDOWS_8_1_OR_NEWER: LazyLock<bool> = LazyLock::new(|| unsafe {
|
||||
let mut version_info: OSVERSIONINFOEXW = MaybeUninit::zeroed().assume_init();
|
||||
|
||||
version_info.dwOSVersionInfoSize = std::mem::size_of::<OSVERSIONINFOEXW>() as u32;
|
||||
|
Reference in New Issue
Block a user