-
Cargo How to Display Print in Test Command
Sometime you try to understand why an assertion failed. It can be many things and you need some visibility to understand what’s wrong with your code.
By default cargo test prevent every
print
. To display it you just need to use this:$ cargo test -- --nocapture
Enjoy