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

refactor: do not return error as it is always nil #1759

Merged

Conversation

alexandear
Copy link
Contributor

The functions brotliBody, gzipBody, deflateBody, and zstdBody always return a nil error. Therefore, this PR removes error from the return argument of these functions.

@alexandear alexandear force-pushed the refactor/remove-returning-err branch from 48d37ba to 332aa32 Compare April 17, 2024 15:02
Copy link
Collaborator

@erikdubbelboer erikdubbelboer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it's better to remove the error return or to actually capture the errors in the NewStreamReader callback that are currently being ignored. Although I'm not sure how to capture those without causing garbage to be generate.

@erikdubbelboer erikdubbelboer merged commit e88bd48 into valyala:master Apr 21, 2024
17 of 19 checks passed
@erikdubbelboer
Copy link
Collaborator

Lets merge this for now. Thanks!

@alexandear alexandear deleted the refactor/remove-returning-err branch April 21, 2024 19:59
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.

2 participants