1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
// re-export of error pub use crate::error::Error; // standard error type pub type Result<T> = core::result::Result<T, Error>; // generic wrapper tuple struct for newtype pattern #[derive(Debug)] pub struct W<T>(pub T); // shortcuts pub use std::format as f; // Commented out - unused // utility macros #[macro_export] macro_rules! fatal { ($($arg:tt)*) => {{ ::log::error!($($arg)*); panic!($($arg)*); }}; } #[cfg(test)] mod tests { #[test] #[should_panic(expected = "testing panic!")] fn test_fatal() { fatal!("testing panic!"); } }