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

Add tree trait #43

Closed
wants to merge 6 commits into from
Closed

Add tree trait #43

wants to merge 6 commits into from

Conversation

gballet
Copy link
Owner

@gballet gballet commented Nov 13, 2019

This PR prepares the ground for supporting several tree formats. This addresses #10 and supersedes #42

As a result, it adds a trait Tree that supports operations like insertion and iteration over the set of child nodes, then re-implements Node in terms of this trait.

// Was it an extension of 1 ? If so, place the node directly
// otherwise truncate the extension.
res[extkey[0] as usize] = if extkey.len() == 1 {
child.clone()
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: it should be possible to get rid of these clones.

@gballet
Copy link
Owner Author

gballet commented Nov 22, 2019

Superseded by #44

@gballet gballet closed this Nov 22, 2019
@gballet gballet mentioned this pull request Nov 26, 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

Successfully merging this pull request may close these issues.

1 participant