-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Capitalize CR title whose length should be < 72 chars]
**Description** Fixes #19 This commit modifies the `IntoIter` implementation to be multiple steps: 1. Deallocate all the inner node of the trie, leaving only the leave nodes 2. Iterate through the leaf nodes by linked list and deallocate the leaf node and return the key-value pairs. 3. If there are any leaf nodes remaining on drop, deallocate all of them This commit also moves the tree dealloc operation into a separate module, and adds a couple variants of the dealloc operation to support the `IntoIter` modifications. **Motivation** This change makes the `IntoIter` more efficient, since we don't have to maintain a valid trie between each call to `next()`. **Testing Done** `./scripts/full-test.sh nightly`
- Loading branch information
Showing
5 changed files
with
283 additions
and
87 deletions.
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.