fix: release builds
This commit is contained in:
parent
f431290284
commit
67c79a1b8f
|
@ -263,6 +263,14 @@ unsafe fn invariant(check: bool) {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(not(debug_assertions))]
|
||||
#[inline(always)]
|
||||
unsafe fn invariant(check: bool) {
|
||||
if check {
|
||||
std::hint::unreachable_unchecked();
|
||||
}
|
||||
}
|
||||
|
||||
/// Mainly copied from the original code, slightly modified to make working with it easier.
|
||||
#[repr(transparent)]
|
||||
pub struct Slab([u8]);
|
||||
|
|
Loading…
Reference in New Issue