1#![deny(warnings)]
5#![allow(unused_features)]
6#![warn(clippy::all, clippy::pedantic)]
7#![allow(clippy::inline_always)]
8#![no_std]
9
10#[macro_export]
12macro_rules! debug_check_or_release_hint {
13 ($condition:expr) => {
14 #[cfg(debug_assertions)]
15 {
16 assert!($condition);
17 }
18
19 #[cfg(not(debug_assertions))]
20 unsafe {
21 core::hint::assert_unchecked($condition);
22 }
23 };
24 ($condition:expr, $msg: literal) => {
25 #[cfg(debug_assertions)]
26 {
27 assert!($condition, $msg);
28 }
29
30 #[cfg(not(debug_assertions))]
31 unsafe {
32 core::hint::assert_unchecked($condition);
33 }
34 };
35}