Boosted by rust@mas.to ("Rust tips"):
hatchet@infosec.exchange ("Jacob Lindahl ☕️") wrote:
#RustProTip №38: The
debug_assert!macroThe
debug_assert!macro creates an assertion only in debug builds. It is useful for confirming assumptions during development without risking performance degradation in the release build.Playground: https://play.rust-lang.org/?version=stable&mode=release&edition=2024&gist=c07b46949bdedf702cb4649b3504776c
Docs: https://doc.rust-lang.org/std/macro.debug%5Fassert.htmlAll Rust Pro Tips: https://geeklaunch.io/blog/rust-pro-tips-collection/
