assert-not-modified
Rust macro which, given a variable and a block of code, executes the block of code and checks that the variable has not changed.
For instance, this can check that a function does not have side effects.
The given variable must implement Clone and Debug.
Panics
Panics if data is modified with the message "Data was modified where it should not have been".
Example
extern crate assert_not_modified;
// This function returns Err but modifies x anyway. This is misleading.
// This test will expose the lying function :
assert!;