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

IpAddrRange never ends when start and end are both 0 #11

Closed
TyPR124 opened this issue Oct 4, 2019 · 1 comment
Closed

IpAddrRange never ends when start and end are both 0 #11

TyPR124 opened this issue Oct 4, 2019 · 1 comment

Comments

@TyPR124
Copy link
Collaborator

TyPR124 commented Oct 4, 2019

I noticed this while looking at implementing some of the extra Iterator traits and methods for efficiency. This blocks several possible efficiencies with IpAddrRange and related types.

An easy fix would be to replace start with 1 in the event that start and end are equal (end is already replaced with 0 here)

If this is acceptable, I can open a PR for this, and will likely follow up with some iterator efficiencies.

@krisprice
Copy link
Owner

Thanks for spotting this. Absolutely, please create a PR for this fix, and if you don't mind adding a test for it as well that would be appreciated. :) Happy to have you improve on iterator efficiencies also.

krisprice added a commit that referenced this issue Oct 12, 2019
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

2 participants