Test code is total: we require it to always terminate or it's a failure! It also typically has 100% line and branch coverage.
I feel way less nervous about refactoring tests, you can always just run them.
The Rust documentation host, https://docs.rs/, has a really cute nudge to make sure your code has documentation. It exposes the docs coverage percentage in the UI!