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.
Having a local trait
Initis problematic for a number of reasons:Initis implemented on some external types, such asArrayVecandTokenLock, for internal use. However,Initis also exposed to the user to allow for its use withr3::hunk::Hunk, giving access to these internal-use-only trait implementations. This means removing these trait implementations is a breaking change.Initin an external crate requires a dependency onr3even if the rest ofr3is not needed at all.The best course of action is to replace
Initwith something else provided by an upstream crate or a language feature.