We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This chapter use Unique to demonstrate how to implement a Vec. But it is permanently unstable and can only be used by std. Also in https://github.com/rust-lang/rust/blob/478464570e60523adc6d303577d1782229ca1f93/src/libcore/ptr/unique.rs#L28-L34 it recommends that we should use NonNull instead and consider PhantomData<T>.
Unique
NonNull
PhantomData<T>
The text was updated successfully, but these errors were encountered:
What is the pattern to use instead of Unique? With NonNull?
Sorry, something went wrong.
I think this is a duplicate of #83.
Successfully merging a pull request may close this issue.
This chapter use
Unique
to demonstrate how to implement a Vec. But it ispermanently unstable and can only be used by std. Also in
https://github.com/rust-lang/rust/blob/478464570e60523adc6d303577d1782229ca1f93/src/libcore/ptr/unique.rs#L28-L34
it recommends that we should use
NonNull
instead and considerPhantomData<T>
.The text was updated successfully, but these errors were encountered: