Skip to content

Replace lazy_static with std::sync::LazyLock#123

Merged
infinisil merged 1 commit intomainfrom
remove-lazy-static
Nov 25, 2024
Merged

Replace lazy_static with std::sync::LazyLock#123
infinisil merged 1 commit intomainfrom
remove-lazy-static

Conversation

@willbush
Copy link
Copy Markdown
Member

@willbush willbush commented Oct 30, 2024

lazy_static is no longer needed. We can just use this from std:

https://doc.rust-lang.org/std/sync/struct.LazyLock.html

note: no difference in compile times before / after on my machine. Think compile times are dominated by clap (edit actually maybe regex-syntax in regex crate which can't be removed easily).

Copy link
Copy Markdown
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since #122 is currently being worked on by a new contributor, let's wait with merging this one a bit until that's done, so as to not require them to resolve a merge conflict, but this sounds good to me :)

@infinisil infinisil merged commit d717a83 into main Nov 25, 2024
@infinisil infinisil deleted the remove-lazy-static branch November 25, 2024 20:42
@Ben-PH
Copy link
Copy Markdown
Contributor

Ben-PH commented Nov 27, 2024

Sorry about going quiet and stalling this PR. I'm glad it got merged, and happy to make the updates.

@infinisil
Copy link
Copy Markdown
Member

No worries!

@mdaniels5757 mdaniels5757 mentioned this pull request Mar 22, 2026
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.

3 participants