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

[Alternative] Making sure everything is aligned correctly #234

Closed
wants to merge 4 commits into from

Conversation

elichai
Copy link
Member

@elichai elichai commented Aug 28, 2020

Alternative for #233

this uses vecs/box with AlignType for the regular API.
the preallocated API is the same as in #233

@elichai
Copy link
Member Author

elichai commented Aug 28, 2020

In case anyone wonders about NonNull::<[AlignedType; 0]>::dangling() as, it is better than null, because even if you accidentally do Box::from_raw(NonNull::<[T; 0]>::dangling() as NonNull<[T]>) it will be fine because ZSTs in rust only require aligned pointers (I'm working on getting that in writing 😉 )

@apoelstra
Copy link
Member

Closed in favor of #233

@apoelstra apoelstra closed this Dec 21, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants