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

p2p/dnsdisc: use strings.Cut over strings.IndexByte #28787

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

ddl-hust
Copy link
Contributor

in this case use strings.Cut is more clear && readable.

Copy link
Member

@rjl493456442 rjl493456442 left a comment

Choose a reason for hiding this comment

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

Personally I think these two versions are equally intuitive.

I would prefer to keep the original code as there is not too much gain for merging this pull request.

@ddl-hust
Copy link
Contributor Author

Personally I think these two versions are equally intuitive.

I would prefer to keep the original code as there is not too much gain for merging this pull request.

See some strings.Cut's discussion lmo, just make it more clearly

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

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

Well, it's a bit shorter, if nothing else. Ok to me

@holiman holiman changed the title refactor(p2p/dnsdisc):replace strings.IndexByte with strings.Cut p2p/dnsdisc: use strings.Cut over strings.IndexByte Jan 12, 2024
@holiman holiman added this to the 1.13.11 milestone Jan 12, 2024
@holiman holiman merged commit 1335ba5 into ethereum:master Jan 12, 2024
1 of 2 checks passed
Dergarcon pushed a commit to specialmechanisms/mev-geth-0x2mev that referenced this pull request Jan 31, 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

Successfully merging this pull request may close these issues.

3 participants