Skip to content

Try to avouid unsafe in singleton example #28

Description

@jhughes-dev

The singleton example uses unsafe to provide references to the static which the borrow checker cannot trace.

There are two ways we might avoud this:

  1. Use Arc<RefCell<...>> which might let us pass out references.
  2. Use a static reference in a struct.

I'm not sure either of these will work, but it should be investigated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions