Skip to content

Replace lazy_static with OnceLock and set rust-version#139

Open
smoe wants to merge 1 commit into
rust-bio:masterfrom
smoe:remove-lazystatic-dependency
Open

Replace lazy_static with OnceLock and set rust-version#139
smoe wants to merge 1 commit into
rust-bio:masterfrom
smoe:remove-lazystatic-dependency

Conversation

@smoe

@smoe smoe commented Mar 27, 2026

Copy link
Copy Markdown

Hello,

I had this dependency on lazy_static in my local project and traced that to rust-bio, and from there to rust-bio-types.

The minimal rust-version for OnceLock (https://doc.rust-lang.org/beta/std/sync/struct.OnceLock.html) is 1.70, which likely is ok since rust-bio declares 1.82 as its minimal version. LazyLock would be with 1.80. So most likely OnceLock is the modernisation path with the least impact on the minimal version of rust required.

Disclaimer: I had OpenAI Codex create this patch for me. From what see and read about about it, it looks fine.

@smoe
smoe force-pushed the remove-lazystatic-dependency branch from 245e923 to 0612e7b Compare March 27, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant