-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add Iterator traits #75
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## main #75 +/- ##
==========================================
+ Coverage 97.88% 98.00% +0.11%
==========================================
Files 46 49 +3
Lines 1610 2155 +545
==========================================
+ Hits 1576 2112 +536
- Misses 34 43 +9
Continue to review full report at Codecov.
|
Of course, I'll probably move stuff around, but this works. Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
(I should probably use a generic...) Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
It turns out that it is easy to prevent overflow if we do this. Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Tests coming soon. Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
It'd be nice to have some random tests to verify that nothing breaks... we'll see about that. Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
This is far cleaner! And more expandible! Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Rather than unwrapping and rewrapping shortly thereafter, we can just call .ok() to transform the Result<T, E> from parsing into an Option<T>, which is guaranteed to be T=IpAddr as we want it. This lets all these things sit on one line, which is also nice. Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Generic across the entire conceivable set of types, in fact! Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
This is slightly more aligned with what the trait does. Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
This is apparently a short enough name to work properly! Yippee. Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
This method _always_ returns `false`, since a network is never empty. Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
(This method always returns zero, since log(0) is undefined.) Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com> Tested-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #74.
Draft-to-Final Checklist
AddressIterator<N, A>
generic and provide impls onNet.*Addr
types.SubnetIterator<N, A>
generic and provide impls onNet.*Addr
types.Acceptance criteria