diff --git a/src/pool/mod.rs b/src/pool/mod.rs index 99256207..9c28dc6b 100644 --- a/src/pool/mod.rs +++ b/src/pool/mod.rs @@ -350,13 +350,12 @@ impl Pool { /// /// This method returns the number of *new* blocks that can be allocated. pub fn grow(&self, memory: &'static mut [u8]) -> usize { - let sz = mem::size_of::>(); - - if sz == 0 { - // SZT use no memory so a pool of SZT always has maximum capacity + if mem::size_of::() == 0 { + // ZST use no memory so a pool of ZST always has maximum capacity return usize::max_value(); } + let sz = mem::size_of::>(); let mut p = memory.as_mut_ptr(); let mut len = memory.len();