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

enable deny for use of unwrap #1245

Open
ilrudie opened this issue Aug 1, 2024 · 1 comment
Open

enable deny for use of unwrap #1245

ilrudie opened this issue Aug 1, 2024 · 1 comment

Comments

@ilrudie
Copy link
Contributor

ilrudie commented Aug 1, 2024

Consider adding

# This will deny use of unwrap on Result and Option outside of tests
unwrap_used = { level = "deny",  allow-unwrap-in-tests = "true" }

to the lints.clippy section of cargo.toml to enable denying unwrap in our code.

There are some test helpers which are not explicitly tests and will now pass. Easy enough to allow unwrap on their mod definitions though to unblock. Similar for our main fn in build.rs which is easy to resolve.

There are still ~60 uses of unwrap to resolve though so its not job done and we should reach some consensus before doing more than this exploration I think.

@ilrudie
Copy link
Contributor Author

ilrudie commented Aug 1, 2024

related #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant