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

Provide alignment function on crate types to get the alignment size. #29

Closed
V0ldek opened this issue May 28, 2022 · 1 comment
Closed
Assignees
Labels
enhancement New feature or request go ahead Reviewed, implementation can start good first issue Good for newcomers help wanted Extra attention is needed

Comments

@V0ldek
Copy link
Owner

V0ldek commented May 28, 2022

Is your feature request related to a problem? Please describe.
Sometimes one wants to use the alignment size of a given slice as a constant.
Currently that requires duplicating A::size() for the given A.

Describe the solution you'd like
AlignedBytes, AlignedSlice and AlignedBlock should all have an alignment function that
returns the alignment size. It must be noted in the docs that this might not reflect the actual alignment (it might be lower than the actual alignment).

@V0ldek V0ldek added enhancement New feature or request triage Waiting for owner's input labels May 28, 2022
@V0ldek V0ldek self-assigned this May 28, 2022
@V0ldek V0ldek added help wanted Extra attention is needed good first issue Good for newcomers go ahead Reviewed, implementation can start and removed triage Waiting for owner's input labels May 28, 2022
V0ldek added a commit that referenced this issue May 31, 2022
Allows getting the `alignment` size as a method instead of static.

Refs: #29
@V0ldek
Copy link
Owner Author

V0ldek commented Jun 2, 2022

@V0ldek V0ldek closed this as completed Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go ahead Reviewed, implementation can start good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant