Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audit code for unnecessary panics #42

Open
jamesyoungman opened this issue Apr 12, 2022 · 1 comment
Open

Audit code for unnecessary panics #42

jamesyoungman opened this issue Apr 12, 2022 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jamesyoungman
Copy link
Contributor

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.

@jamesyoungman jamesyoungman added enhancement New feature or request good first issue Good for newcomers labels Apr 12, 2022
@jamesyoungman
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant