mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 12:18:07 +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:
@ -1,7 +1,7 @@
|
||||
use nix::sys::resource::{rlim_t, Resource, RLIM_INFINITY};
|
||||
use nu_engine::command_prelude::*;
|
||||
|
||||
use once_cell::sync::Lazy;
|
||||
use std::sync::LazyLock;
|
||||
|
||||
/// An object contains resource related parameters
|
||||
struct ResourceInfo<'a> {
|
||||
@ -54,7 +54,7 @@ impl<'a> Default for ResourceInfo<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
static RESOURCE_ARRAY: Lazy<Vec<ResourceInfo>> = Lazy::new(|| {
|
||||
static RESOURCE_ARRAY: LazyLock<Vec<ResourceInfo>> = LazyLock::new(|| {
|
||||
let resources = [
|
||||
#[cfg(any(target_os = "freebsd", target_os = "dragonfly"))]
|
||||
(
|
||||
|
Reference in New Issue
Block a user