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

Remove unused code from readMIMEHeader #737

Merged
merged 1 commit into from
Jun 28, 2021
Merged

Remove unused code from readMIMEHeader #737

merged 1 commit into from
Jun 28, 2021

Conversation

rutgerbrf
Copy link
Contributor

The strs slice is not used - it seems to have stuck around from net/textproto.ReadMIMEHeader.

The strs slice is not used - it seems to have stuck around from
net/textproto.ReadMIMEHeader.

Signed-off-by: Rutger Broekhoff <rutger@viasalix.nl>
@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) to 87.023% when pulling 1e62342 on rutgerbrf:master into da90d22 on nats-io:master.

Copy link
Contributor

@variadico variadico left a comment

Choose a reason for hiding this comment

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

Ah, ok. strs never gets initialized or modified so its length is always zero. And because it's always zero, we don't need that if statement.

Looks like in the original code there was a possibility of strs being initialized, but our code is a bit different and doesn't include that case.

LGTM! Thanks!

@wallyqs wallyqs merged commit 274aa57 into nats-io:master Jun 28, 2021
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.

4 participants