2023-09-13 14:13:23 +00:00
|
|
|
pub use crate::error::Error;
|
|
|
|
|
2023-09-14 04:03:17 +00:00
|
|
|
pub type BoxResult<T> = std::result::Result<T, Box<dyn std::error::Error>>;
|
2023-09-13 14:13:23 +00:00
|
|
|
|
|
|
|
// i just wanted to mess around with macros a bit
|
|
|
|
// so heres labelprint as a macro
|
|
|
|
#[macro_export]
|
|
|
|
macro_rules! lprint {
|
2023-09-14 21:15:39 +00:00
|
|
|
($expr:expr) => {{
|
2023-09-13 14:13:23 +00:00
|
|
|
let ___this_file = std::file!();
|
|
|
|
let ___line = std::line!();
|
|
|
|
// let ___column = column!();
|
|
|
|
println!("[{}:{}] {}", ___this_file, ___line, $expr);
|
2023-09-14 21:15:39 +00:00
|
|
|
}};
|
|
|
|
($expr:expr, $($arg:tt)*) => {{
|
2023-09-13 14:13:23 +00:00
|
|
|
lprint!(format!($expr, $($arg)*));
|
2023-09-14 21:15:39 +00:00
|
|
|
}};
|
2023-09-13 14:13:23 +00:00
|
|
|
}
|