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

Switch to std::sync::LazyLock #441

Open
Serial-ATA opened this issue Aug 12, 2024 · 0 comments
Open

Switch to std::sync::LazyLock #441

Serial-ATA opened this issue Aug 12, 2024 · 0 comments
Labels
blocked Blocked on something else, cannot be worked on yet good first issue These issues are a good way to get started with Lofty

Comments

@Serial-ATA
Copy link
Owner

Usage of once_cell::sync::Lazy was replaced with std::sync::OnceLock awhile ago:

fn v2keys() -> &'static HashMap<&'static str, &'static str> {
static INSTANCE: OnceLock<HashMap<&'static str, &'static str>> = OnceLock::new();
INSTANCE.get_or_init(|| {
let mut map = HashMap::new();
$(
$(
map.insert($v2_key, $id3v24_from_v2);
)+
)+
map
})
}

In 1.80.0, std::sync::LazyLock was finally stabilized. Now in that example, we can just go back to using V2_KEYS directly instead of having functions to access it.

This is blocked right now since 1.80.0 just came out and it really isn't that important to do anyway.

@Serial-ATA Serial-ATA added blocked Blocked on something else, cannot be worked on yet good first issue These issues are a good way to get started with Lofty labels Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked on something else, cannot be worked on yet good first issue These issues are a good way to get started with Lofty
Projects
None yet
Development

No branches or pull requests

1 participant