Open Antosser opened 5 months ago
Totally agree! Go for it!
I think having unwraps in tests is fine at least for the needs on this project because in tests we are validating specific scenarios.
If test runs on panic due to unwrap
, its a good signal of either:
Both determines failure in any case so I would keep unwraps in tests for simplicity sake.
I cant say the same with end user code/source. No unwraps/cases of panic should exist there.
@EstebanBorai Please review #423 first to avoid collisions
I think having unwraps in tests is fine at least for the needs on this project because in tests we are validating specific scenarios.
I agree
This project contains A LOT of unwraps, which can be easily avoided and removed, making the code much rustier. I'd like to do that after #423 gets merged.
To handle all possible errors, we would need a proper
Result
type;Result<T, Box<dyn Error>>
won't do. We could use anyhow, but I'd suggest color_eyre because of the fancier look when an error happens. Let me know what you thinkHere's a list of all unwraps or expects I found using ripgrep: