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

Allow Option<Id<T>> to use the null pointer optimization #2

Open
SSheldon opened this issue Nov 7, 2015 · 0 comments
Open

Allow Option<Id<T>> to use the null pointer optimization #2

SSheldon opened this issue Nov 7, 2015 · 0 comments

Comments

@SSheldon
Copy link
Owner

SSheldon commented Nov 7, 2015

Since Ids will never be null, the representation of Option<Id<T>> can take advantage of this to be the same size as an Id<T>.

Doing this requires the NonZero struct, which is being stabilized with rust-lang/rust#27730.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant