jiff/util/
constant.rs

1/// Unwrap an `Option<T>` in a `const` context.
2///
3/// If it fails, panics with the given message.
4macro_rules! unwrap {
5    ($val:expr, $msg:expr$(,)?) => {
6        match $val {
7            Some(val) => val,
8            None => panic!($msg),
9        }
10    };
11}
12
13pub(crate) use unwrap;