mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-19 13:36:54 +02:00
added debug assert
This commit is contained in:
parent
1163a41e41
commit
adf3fe3cb5
1 changed files with 3 additions and 3 deletions
|
@ -38,9 +38,9 @@ impl<Fragment, const MAX_FRAGMENTS: usize> Fragged<Fragment, MAX_FRAGMENTS> {
|
|||
// that the array of MaybeUninit<Fragment> can be freely cast into an array of
|
||||
// Fragment. They also check that the maximum number of fragments is not too large
|
||||
// for the fact that we use bits in a u64 to track which fragments are received.
|
||||
assert!(MAX_FRAGMENTS <= 64);
|
||||
assert_eq!(size_of::<MaybeUninit<Fragment>>(), size_of::<Fragment>());
|
||||
assert_eq!(
|
||||
debug_assert!(MAX_FRAGMENTS <= 64);
|
||||
debug_assert_eq!(size_of::<MaybeUninit<Fragment>>(), size_of::<Fragment>());
|
||||
debug_assert_eq!(
|
||||
size_of::<[MaybeUninit<Fragment>; MAX_FRAGMENTS]>(),
|
||||
size_of::<[Fragment; MAX_FRAGMENTS]>()
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue