fix: PageSize bounds check

This commit is contained in:
Levy A.
2025-07-22 17:15:34 -03:00
parent fe66c61ff5
commit 2bde1dbd42

View File

@@ -89,7 +89,7 @@ impl PageSize {
pub const DEFAULT: u16 = 4096;
pub const fn new(size: u32) -> Option<Self> {
if !(PageSize::MIN < size && size <= PageSize::MAX) {
if size < PageSize::MIN || size > PageSize::MAX {
return None;
}