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

Remove redundant alignment check #314

Merged
merged 1 commit into from
Nov 6, 2021
Merged

Remove redundant alignment check #314

merged 1 commit into from
Nov 6, 2021

Conversation

mpajkowski
Copy link
Contributor

This PR removes double alignment check - proper alignment to S::Size is asserted by this condition:

        if !address.is_aligned(S::SIZE) {
            return Err(AddressNotAligned);
        }

@phil-opp phil-opp added the waiting-for-review Waiting for a review from the maintainers. label Nov 6, 2021
Copy link
Member

@phil-opp phil-opp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@phil-opp phil-opp enabled auto-merge (squash) November 6, 2021 13:21
@phil-opp phil-opp merged commit e8aee52 into rust-osdev:master Nov 6, 2021
@mpajkowski mpajkowski deleted the double-align-check branch November 19, 2021 00:19
@phil-opp phil-opp mentioned this pull request Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-review Waiting for a review from the maintainers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants