From d5731fcf90d8f5455a81530c5d73df64b92d167f Mon Sep 17 00:00:00 2001 From: Chris Holcombe Date: Wed, 25 Sep 2024 11:01:24 -0700 Subject: [PATCH] Use std mem size_of --- src/storage.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage.rs b/src/storage.rs index 6559446..ffff95f 100644 --- a/src/storage.rs +++ b/src/storage.rs @@ -168,7 +168,7 @@ impl From>> for Heap { // Convert `value` to boxed slice of length equals to `value.capacity()` // except for zero-sized types - for them length will be `value.len()` because `Vec::capacity` for ZST is undefined // (see ). - if size_of::() != 0 { + if std::mem::size_of::() != 0 { unsafe { value.set_len(value.capacity()) }; } Self::from(value.into_boxed_slice())