|
|
@ -43,6 +43,7 @@ pub mod dbg {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
($val:expr) => {
|
|
|
|
($val:expr) => {
|
|
|
|
if cfg!(debug_assertions) {
|
|
|
|
if cfg!(debug_assertions) {
|
|
|
|
|
|
|
|
let stringify = stringify!($val);
|
|
|
|
// Use of `match` here is intentional because it affects the lifetimes
|
|
|
|
// Use of `match` here is intentional because it affects the lifetimes
|
|
|
|
// of temporaries - https://stackoverflow.com/a/48732525/1063961
|
|
|
|
// of temporaries - https://stackoverflow.com/a/48732525/1063961
|
|
|
|
match $val {
|
|
|
|
match $val {
|
|
|
@ -57,7 +58,7 @@ pub mod dbg {
|
|
|
|
line!(),
|
|
|
|
line!(),
|
|
|
|
column!()
|
|
|
|
column!()
|
|
|
|
);
|
|
|
|
);
|
|
|
|
eprintln!("{} = {:?}", stringify!(tmp), tmp);
|
|
|
|
eprintln!("{} = {:?}", stringify, tmp);
|
|
|
|
tmp
|
|
|
|
tmp
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|