about summary refs log tree commit diff
path: root/library/core/src/alloc/layout.rs
diff options
context:
space:
mode:
authorChristopher Durham <cad97@cad97.com>2022-06-30 00:17:21 -0400
committerGitHub <noreply@github.com>2022-06-30 00:17:21 -0400
commit344b99bd9f6415c08bee367ecc12fb3a5f84ac76 (patch)
tree6d5ae88b74a0955f1663e72b88b321e2f71bbfb4 /library/core/src/alloc/layout.rs
parentc4b4c64804ebbbbe00e82eedeb2fec7441459d35 (diff)
downloadrust-344b99bd9f6415c08bee367ecc12fb3a5f84ac76.tar.gz
rust-344b99bd9f6415c08bee367ecc12fb3a5f84ac76.zip
nit
Co-authored-by: scottmcm <scottmcm@users.noreply.github.com>
Diffstat (limited to 'library/core/src/alloc/layout.rs')
-rw-r--r--library/core/src/alloc/layout.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/alloc/layout.rs b/library/core/src/alloc/layout.rs
index 70fa7d88ebf..e43fd29d943 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<Self, LayoutError> {
         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