1
2
3
4
5
6
7
8
#[macro_export]
macro_rules! panic_once {
    ($fmt:expr, $($arg:tt)+) => {
        if !std::thread::panicking() {
            panic!($fmt, $($arg)+);
        }
    }
}