forked from StrafesNET/map-tool
20 lines
574 B
Rust
20 lines
574 B
Rust
|
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)*));
|
||
|
};
|
||
|
}
|