-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat(trie): sparse trie leaf removal #11752
Conversation
16ede41
to
a4fbfa7
Compare
d420915
to
7591030
Compare
f51d7a6
to
6592ae9
Compare
09b87fd
to
cad2dce
Compare
c02edf1
to
684e452
Compare
c531954
to
f15b063
Compare
d313383
to
b8346ba
Compare
|
||
// Walk the stack of removed nodes from the back and re-insert them back into the trie, | ||
// adjusting the node type as needed. | ||
while let Some(removed_node) = removed_nodes.pop() { |
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.
the leaf node might also be the root. then removed_nodes is empty and we violate the invariant that the trie always contains the root node. would be great to add a test for this too
Co-authored-by: Roman Krasiuk <[email protected]>
Co-authored-by: Roman Krasiuk <[email protected]>
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.
great job
Closes #11743
Blocked by alloy-rs/trie#58