Skip to content

Commit 7bb4e82

Browse files
committed
fix assert in layout array_unchecked
1 parent 88e5bc6 commit 7bb4e82

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/layout.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ impl Layout {
127127
assert_unsafe_precondition!(
128128
"`Layout::array_unchecked` requires that `T::SZ * n` rounded up to `T::ALN` will not \
129129
exceed `USIZE_MAX_NO_HIGH_BIT`.",
130-
<T>(n: usize = n) => [T::SZ != 0 || n <= (USIZE_HIGH_BIT - T::ALN) / T::SZ]
130+
<T>(n: usize = n) => [T::SZ == 0 || n <= (USIZE_HIGH_BIT - T::ALN) / T::SZ]
131131
);
132132
Layout::from_size_align_unchecked(T::SZ * n, T::ALN)
133133
}

0 commit comments

Comments
 (0)