if disabled
(func: F)
| 42 | |
| 43 | #[cfg(all(feature = "disable_release", not(debug_assertions)))] // if disabled |
| 44 | pub fn assert_no_alloc<T, F: FnOnce() -> T> (func: F) -> T { // no-op |
| 45 | func() |
| 46 | } |
| 47 | |
| 48 | #[cfg(not(all(feature = "disable_release", not(debug_assertions))))] // if not disabled |
| 49 | /// Calls the `func` closure, but forbids any (de)allocations. |