Switch to debug_assert! for an assert! involving only constants

Signed-off-by: Chris Hennick <4961925+Pr0methean@users.noreply.github.com>
This commit is contained in:
Chris Hennick 2024-05-24 12:58:36 -07:00 committed by GitHub
parent 848309a944
commit 18760e9f9d
Signed by: DevComp
GPG key ID: B5690EEEBB952194

View file

@ -309,7 +309,7 @@ impl Zip32CentralDirectoryEnd {
const END_WINDOW_SIZE: usize = 512;
/* TODO: use static_assertions!() */
assert!(END_WINDOW_SIZE > mem::size_of::<Magic>());
debug_assert!(END_WINDOW_SIZE > mem::size_of::<Magic>());
const SIG_BYTES: [u8; mem::size_of::<Magic>()] =
Magic::CENTRAL_DIRECTORY_END_SIGNATURE.to_le_bytes();