Skip to content

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

Description

@SSheldon

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions