1#![deny(clippy::arithmetic_side_effects)] 2pub mod aligned_memory; 3 4/// Returns true if `ptr` is aligned to `align`. 5pub fn is_memory_aligned(ptr: usize, align: usize) -> bool { 6 ptr.checked_rem(align) 7 .map(|remainder| remainder == 0) 8 .unwrap_or(false) 9}