From 344b99bd9f6415c08bee367ecc12fb3a5f84ac76 Mon Sep 17 00:00:00 2001 From: Christopher Durham Date: Thu, 30 Jun 2022 00:17:21 -0400 Subject: [PATCH] nit Co-authored-by: scottmcm --- library/core/src/alloc/layout.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/alloc/layout.rs b/library/core/src/alloc/layout.rs index 70fa7d88ebfe..e43fd29d9439 100644 --- a/library/core/src/alloc/layout.rs +++ b/library/core/src/alloc/layout.rs @@ -384,7 +384,7 @@ impl Layout { pub fn repeat_packed(&self, n: usize) -> Result { let size = self.size().checked_mul(n).ok_or(LayoutError)?; // The safe constructor is called here to enforce the isize size limit. - Layout::from_size_align(size as usize, self.align()) + Layout::from_size_align(size, self.align()) } /// Creates a layout describing the record for `self` followed by