-
Notifications
You must be signed in to change notification settings - Fork 14
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
Implement iterator over nodes; refactor key-value iterator #517
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, all are remaining nits. There is one extra allocation you should probably remove before merging.
== Ordering::Greater | ||
{ | ||
// `child` is after `key`. | ||
let key = matched_key_nibbles |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: since we're doing exactly the same thing earlier, perhaps a helper function would be useful here
} | ||
check_stream_is_done(stream).await; | ||
|
||
// Test with start key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: new test?
🥇 |
alternate implementation to #499.
This PR implements an iterator over nodes. The iterator can be configured to start at a given key. Uses this node iterator to refactor the key-value iterator implementation.