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

Remove element from tree, by id #30

Open
jeromegn opened this issue Oct 13, 2022 · 1 comment · May be fixed by #38
Open

Remove element from tree, by id #30

jeromegn opened this issue Oct 13, 2022 · 1 comment · May be fixed by #38

Comments

@jeromegn
Copy link

Would it be possible to remove a path from the tree, by id?

Looking through the code, it looks like it might be possible, but I'm not exactly sure how I'd do it.

@fundon
Copy link
Member

fundon commented Oct 14, 2022

Yes, you can delete nodes and data by id.

See https://github.com/viz-rs/path-tree/blob/main/src/node.rs#L19, the node stores the id, so we can look it up recursively.

PR welcome. :)

@fundon fundon linked a pull request Jan 15, 2024 that will close this issue
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 a pull request may close this issue.

2 participants