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

Replace Init with const Default or something else #3

Open
yvt opened this issue Dec 19, 2021 · 0 comments
Open

Replace Init with const Default or something else #3

yvt opened this issue Dec 19, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@yvt
Copy link
Member

yvt commented Dec 19, 2021

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.

@yvt yvt added the bug Something isn't working label Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant