Merge pull request 'stop macro from returning' (#2) from Jeftaei/map-tool:master into master
Reviewed-on: #2
This commit is contained in:
commit
b0fe231388
@ -6,13 +6,13 @@ pub type BoxResult<T> = std::result::Result<T, Box<dyn std::error::Error>>;
|
|||||||
// so heres labelprint as a macro
|
// so heres labelprint as a macro
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! lprint {
|
macro_rules! lprint {
|
||||||
($expr:expr) => {
|
($expr:expr) => {{
|
||||||
let ___this_file = std::file!();
|
let ___this_file = std::file!();
|
||||||
let ___line = std::line!();
|
let ___line = std::line!();
|
||||||
// let ___column = column!();
|
// let ___column = column!();
|
||||||
println!("[{}:{}] {}", ___this_file, ___line, $expr);
|
println!("[{}:{}] {}", ___this_file, ___line, $expr);
|
||||||
};
|
}};
|
||||||
($expr:expr, $($arg:tt)*) => {
|
($expr:expr, $($arg:tt)*) => {{
|
||||||
lprint!(format!($expr, $($arg)*));
|
lprint!(format!($expr, $($arg)*));
|
||||||
};
|
}};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user