diff-ba-rs
About
This library provides macros to get the difference of variables caused by a procedure.
Before and after the operation, use the pretty-print format by fmt::Debug to string them, and get their diff.
How to use
# Cargo.toml
[]
= "0.1.0"
use *;
let mut complex_variable = ComplexVariable ;
let _result = dbg!;
Very easy sample
use *;
let mut a = 2;
let b = dbg!;
// prints:
// ```
// - 2
// + 4
// ```
assert_eq!;
Note
For now, only the dbg! macro prints to standard output, but if there is demand for it from myself or others, I may implement a macro that returns a string or writes to a file.
License
diff-ba-rs is released under the MIT License