From 167ab8d8371c194ebe3745bfd2ed52e9756f4b54 Mon Sep 17 00:00:00 2001 From: asttool Date: Wed, 15 Oct 2025 17:58:43 +0800 Subject: [PATCH] chore: fix comment for crates/allocator/src/bump.rs Signed-off-by: asttool --- crates/allocator/src/bump.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/allocator/src/bump.rs b/crates/allocator/src/bump.rs index 73ccecb3bc..304b6b3419 100644 --- a/crates/allocator/src/bump.rs +++ b/crates/allocator/src/bump.rs @@ -170,9 +170,9 @@ impl InnerAlloc { /// of a layout in the linear memory. /// - Initially `self.next` is `0` and aligned /// - `layout.align() - 1` accounts for `0` as the first index. - /// - the binary with the inverse of the align creates a bitmask that is used to zero - /// out bits, ensuring alignment according to type requirements and ensures that the - /// next allocated pointer address is of the power of 2. + /// - the bitwise AND with the inverse of the align creates a bitmask that is used + /// to zero out bits, ensuring alignment according to type requirements and ensures + /// that the next allocated pointer address is of the power of 2. #[allow(clippy::arithmetic_side_effects)] // todo fn align_ptr(&self, layout: &Layout) -> usize { (self.next + layout.align() - 1) & !(layout.align() - 1)