Skip to content

Switch to std::sync::LazyLock #441

@Serial-ATA

Description

@Serial-ATA

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueThese issues are a good way to get started with Lofty

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions