TX-2-simulator
TX-2-simulator copied to clipboard
Audit code for unnecessary panics
Is your feature request related to a problem? Please describe. Calls to panic() are undesirable. It's generally OK where these signal code paths which are not reachable (i.e. I don't think we should avoid unreachable!() in general). But it would be useful to remove other panics. Such as avoidable calls to unwrap().
It's possible that there will be some cases where we can refactor inputs so that their types are such that we no longer need the code branch which currently calls panic (directly or indirectly).
Describe the solution you'd like Fewer calls to panic() and ideally some kind of feedback for the programmer when a new call to panic() is introduced.
Describe alternatives you've considered None.
Additional context The rustig! tool from Delft University might help.
I'm tagging this as "good first issue" because the work can be done with only a knowledge of Rust, and that it's not necessary to understand much, if anything, about the TX-2.