Skip to content

Make Once struct publicly available #2

Closed
@SSheldon

Description

@SSheldon

There's a neat little Once struct that wraps dispatch_once, but it's not usable since there's no way to initialize a const UnsafeCell.

Once const fns are stabilized in rust-lang/rust#24111, the Once::new method can be marked const and the struct will be usable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions