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

Propagate error if retrieving encoded length fails instead of panic #79

Merged
merged 2 commits into from
Jun 7, 2024

Conversation

wiktor-k
Copy link
Owner

@wiktor-k wiktor-k commented Jun 5, 2024

No description provided.

@wiktor-k
Copy link
Owner Author

wiktor-k commented Jun 5, 2024

I'm wondering what do you all think about the second commit that disallows using unwraps? (the only one instance was the thing fixed by the first commit).

@wiktor-k wiktor-k force-pushed the wiktor/disallow-unwraps branch from 58d0091 to 4986d0b Compare June 7, 2024 12:31
@wiktor-k
Copy link
Owner Author

wiktor-k commented Jun 7, 2024

Okay, let's go with it for the time being...

I've also experimented with the following in Cargo.toml (courtesy of @hko-s):

[lints.clippy]
expect_used = "warn"
panic = "warn"
todo = "warn"
unimplemented = "warn"
unwrap_used = "warn"

Unfortunately (or fortunately?) it applies also to tests and examples so it's a more significant change.

@wiktor-k wiktor-k enabled auto-merge June 7, 2024 12:33
@wiktor-k wiktor-k merged commit 04504ab into main Jun 7, 2024
16 checks passed
@wiktor-k wiktor-k deleted the wiktor/disallow-unwraps branch June 7, 2024 12:34
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

Successfully merging this pull request may close these issues.

1 participant