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

Avoid making ancestor-descendant cycle on append and prepend #79

Merged

Conversation

lo48576
Copy link
Contributor

@lo48576 lo48576 commented Mar 4, 2022

Fixes #78.

Unfortunately this makes prepend and append not constant time operation (worst O(N)), but I think this is necessary.

This change adds two new NodeError variants, but NodeError is marked #[non_exhaustive] so this is a feature addition but won't be a breaking change.

@lo48576
Copy link
Contributor Author

lo48576 commented Mar 4, 2022

The CI failures seem false positive.
Clippy failure is not caused by this change, and will be addressed by #80.
Codecov failure is "checksum" error (I don't know what it is) and the codebase itself doesn't seems to be responsible.

@saschagrunert saschagrunert merged commit 6fec2de into saschagrunert:master Mar 7, 2022
@lo48576 lo48576 deleted the fix/cyclic-append-detection branch March 7, 2022 15:47
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.

Suggestion: Panic when appending to node that has self node as child.
2 participants