Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove once_cell dependency preferring LazyLock #195

Merged
merged 1 commit into from
Dec 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion argh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ argh_derive.workspace = true
rust-fuzzy-search = "0.1.1"

[dev-dependencies]
once_cell = "1.10.0"
trybuild = "1.0.63"

[features]
Expand Down
8 changes: 4 additions & 4 deletions argh/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
//! # use argh::DynamicSubCommand;
//! # use argh::EarlyExit;
//! # use argh::FromArgs;
//! # use once_cell::sync::OnceCell;
//! # use std::sync::LazyLock;
//!
//! #[derive(FromArgs, PartialEq, Debug)]
//! /// Top-level command.
Expand Down Expand Up @@ -240,8 +240,7 @@
//!
//! impl DynamicSubCommand for Dynamic {
//! fn commands() -> &'static [&'static CommandInfo] {
//! static RET: OnceCell<Vec<&'static CommandInfo>> = OnceCell::new();
//! RET.get_or_init(|| {
//! static RET: LazyLock<Vec<&'static CommandInfo>> = LazyLock::new(|| {
//! let mut commands = Vec::new();
//!
//! // argh needs the `CommandInfo` structs we generate to be valid
Expand All @@ -257,7 +256,8 @@
//! })));
//!
//! commands
//! })
//! });
//! &RET
//! }
//!
//! fn try_redact_arg_values(
Expand Down
Loading