Minor fix to macro definition

This commit is contained in:
Jacob Kiesel
2021-03-26 12:34:16 -06:00
parent c318a3ddc0
commit 0bc7ffc9fd
+1 -1
View File
@@ -36,7 +36,7 @@ pub(crate) type LenUint = u32;
macro_rules! assert_capacity_limit {
($cap:expr) => {
if std::mem::size_of::<usize>() > std::mem::size_of::<LenUint>() {
if CAP > LenUint::MAX as usize {
if $cap > LenUint::MAX as usize {
panic!("ArrayVec: largest supported capacity is u32::MAX")
}
}