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

codec module should never panic under any condition #78

Open
Gnurou opened this issue Jun 23, 2024 · 0 comments
Open

codec module should never panic under any condition #78

Gnurou opened this issue Jun 23, 2024 · 0 comments

Comments

@Gnurou
Copy link
Collaborator

Gnurou commented Jun 23, 2024

Codecs should be hardened to the point where they cannot panic under any circumstance. This means no unwrap, no array indexes that could be out-of-bounds, etc. Any problem with the codec should return a specific error.

The problem is with detecting these panic conditions. There are a few features that could help:

  • The missing_panics_doc, unwrap_used and expect_used clippy lints are great to warn about common panic points (the first one also warning upon panic! and assert!).
  • The no_panic crate looks also helpful, but is limited to actual programs and requires some level of optimization to be really useful.
@Gnurou Gnurou changed the title codec module should never panic in any condition codec module should never panic under any condition Jun 24, 2024
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