rust-osdev / x86_64

Library to program x86_64 hardware.
https://docs.rs/x86_64
Apache License 2.0
797 stars 132 forks source link

Remove redundant alignment check #314

Closed mpajkowski closed 3 years ago

mpajkowski commented 3 years ago

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);
        }