From 79c0897aef8080b2ad7f613aa1d93a828c64c996 Mon Sep 17 00:00:00 2001 From: Azzybana Raccoon <121582001+Azzybana@users.noreply.github.com> Date: Sat, 25 Oct 2025 02:54:28 -0400 Subject: [PATCH] Update layout.rs perf: removed unnecessary let for return only --- library/core/src/alloc/layout.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/library/core/src/alloc/layout.rs b/library/core/src/alloc/layout.rs index cd5fd77f8659..1f37c978fecf 100644 --- a/library/core/src/alloc/layout.rs +++ b/library/core/src/alloc/layout.rs @@ -316,8 +316,7 @@ impl Layout { // Size 1 Align MAX or Size isize::MAX Align 2 round up to `isize::MAX + 1`.) unsafe { let align_m1 = unchecked_sub(align.as_usize(), 1); - let size_rounded_up = unchecked_add(self.size, align_m1) & !align_m1; - size_rounded_up + unchecked_add(self.size, align_m1) & !align_m1 } }