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

Use strict_{add,sub,...} instead of checked_{add,sub,...}.unwrap() #3668

Closed
RalfJung opened this issue Jun 11, 2024 · 0 comments · Fixed by #3694
Closed

Use strict_{add,sub,...} instead of checked_{add,sub,...}.unwrap() #3668

RalfJung opened this issue Jun 11, 2024 · 0 comments · Fixed by #3694
Labels
A-style Area: coding style C-cleanup Category: cleaning up our code E-good-first-issue A good way to start contributing, mentoring is available

Comments

@RalfJung
Copy link
Member

The standard library now contains functions for "strict" arithmetic, where overflow is guaranteed to panic. We should use that to replace all the checked_add(...).unwrap() etc in the Miri codebase, hopefully making the code a bit more readable.

@RalfJung RalfJung added E-good-first-issue A good way to start contributing, mentoring is available C-cleanup Category: cleaning up our code A-style Area: coding style labels Jun 11, 2024
@bors bors closed this as completed in dca0151 Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-style Area: coding style C-cleanup Category: cleaning up our code E-good-first-issue A good way to start contributing, mentoring is available
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant