Skip to content

Replace Init with const Default or something else #3

Open
@yvt

Description

@yvt

Having a local trait Init is problematic for a number of reasons:

  • Init is implemented on some external types, such as ArrayVec and TokenLock, for internal use. However, Init is also exposed to the user to allow for its use with r3::hunk::Hunk, giving access to these internal-use-only trait implementations. This means removing these trait implementations is a breaking change.
  • Implementing Init in an external crate requires a dependency on r3 even if the rest of r3 is not needed at all.

The best course of action is to replace Init with something else provided by an upstream crate or a language feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions