#equality #compare #output #function #trivial #eq

debugging_helpers

Trivial functions to make debugging easier

2 unstable releases

0.2.0 Sep 20, 2024
0.1.0 Oct 11, 2023

#366 in Debugging

MIT/Apache

8KB
51 lines

debugging-helpers

Small collection of simple functions to make debugging easier. Nothing specular but stuff I don't want to have write repeatedly for each project. Doesn't contain any production ready code. It's mostly workarounds that you can use during debugging. For example it allows you to compare for equality two types that do not support Eq but do support Debug. It accomplishes this by comparing their debug output. This is terribly inefficient and only works if the debug output includes the part of the type you are interested in checking if it is the same. While this is not suitable for production, this allows you to quickly check for equality when debugging a type that only implements Debug but not Eq.

License

All code in this repository is dual-licensed under either:

at your option. This means you can select the license you prefer! This dual-licensing approach is the de-facto standard in the Rust ecosystem and there are very good reasons to include both as noted in this issue on Bevy's repo.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0–9.5MB
~43K SLoC