Skip to content

Conversation

@orxfun
Copy link
Owner

@orxfun orxfun commented Dec 5, 2025

Lifetimes of self references of NodeRef and NodeMut methods are revised.

Tests are added to make sure that expected code blocks compile: https://github.com/orxfun/orx-tree/blob/fix-188/revisit-lifetimes/tests/iterator_lifetimes.rs.

The fixes mostly break the dependency of the node reference and an iterator created from the node reference. Instead, the returned values lifetime is bound to the lifetime of the tree. Similar fixes are made for lifetime dependencies to the traversers.

Fixes #188

orxfun added 30 commits December 4, 2025 18:32
Copy link
Contributor

@hasezoey hasezoey left a comment

Choose a reason for hiding this comment

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

Looks great, just some style nitpicks.

orxfun and others added 10 commits December 6, 2025 19:08
Co-authored-by: hasezoey <hasezoey@gmail.com>
Co-authored-by: hasezoey <hasezoey@gmail.com>
Co-authored-by: hasezoey <hasezoey@gmail.com>
Co-authored-by: hasezoey <hasezoey@gmail.com>
Co-authored-by: hasezoey <hasezoey@gmail.com>
Co-authored-by: hasezoey <hasezoey@gmail.com>
@orxfun
Copy link
Owner Author

orxfun commented Dec 6, 2025

@hasezoey thanks a lot for the detailed review. Will merge this PR after completing the changes in selfref-col.

@orxfun orxfun merged commit ab51c68 into main Dec 7, 2025
8 checks passed
@orxfun orxfun deleted the fix-188/revisit-lifetimes branch December 7, 2025 15:45
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.

Change NodeRef::walk_with to not require traverser to live as long as the tree / node

3 participants