mapfixer/src/prelude.rs

20 lines
574 B
Rust
Raw Normal View History

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