mirror of
https://github.com/nushell/nushell.git
synced 2025-08-17 08:51:20 +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:
@ -7,7 +7,7 @@ use nu_protocol::{
|
||||
Value,
|
||||
};
|
||||
|
||||
use once_cell::sync::Lazy;
|
||||
use std::sync::LazyLock;
|
||||
|
||||
#[derive(Debug, Default, Clone)]
|
||||
pub struct HelpCmd {}
|
||||
@ -19,7 +19,7 @@ impl HelpCmd {
|
||||
}
|
||||
}
|
||||
|
||||
static HELP_MESSAGE: Lazy<String> = Lazy::new(|| {
|
||||
static HELP_MESSAGE: LazyLock<String> = LazyLock::new(|| {
|
||||
let title = nu_ansi_term::Style::new().bold().underline();
|
||||
let code = nu_ansi_term::Style::new().bold().fg(Color::Blue);
|
||||
|
||||
|
Reference in New Issue
Block a user