Skip to content

Conversation

amirshukayev
Copy link
Contributor

@amirshukayev amirshukayev commented Sep 11, 2025

Only the first and last child were being reparented properly (or parent pointer being updated).

Fixes #44

Previously only first and last siblings had their parent updated,
leaving middle siblings with stale parent references.
@adamreichold
Copy link
Member

Thank you for taking of this issue which appears to have been with us for over 7 years!

@adamreichold
Copy link
Member

I fear there will be many instances of the newly introduced mismatched_lifetime_syntaxes lint firing when this hits the CI. @amirshukayev Would you be up to resolve this as a separate commit but as part of this PR? If not, I'll try to fix these first via separate PR and then we can handle this one.

Cleaned up loop to skip 2nd access to `tree.node_mut`, and rust fmt the
unit tests.
@amirshukayev amirshukayev force-pushed the fix-reparent-middle-siblings branch from 95972fe to 525bcde Compare September 11, 2025 15:06
@adamreichold
Copy link
Member

I fear there will be many instances of the newly introduced mismatched_lifetime_syntaxes lint firing when this hits the CI. @amirshukayev Would you be up to resolve this as a separate commit but as part of this PR? If not, I'll try to fix these first via separate PR and then we can handle this one.

As expected, a lot instances of mismatched-lifetime-syntaxes.

@amirshukayev
Copy link
Contributor Author

amirshukayev commented Sep 11, 2025

I fear there will be many instances of the newly introduced mismatched_lifetime_syntaxes lint firing when this hits the CI. @amirshukayev Would you be up to resolve this as a separate commit but as part of this PR? If not, I'll try to fix these first via separate PR and then we can handle this one.

As expected, a lot instances of mismatched-lifetime-syntaxes.

Fixed with af71571

@adamreichold adamreichold merged commit 40859c1 into rust-scraper:master Sep 11, 2025
5 checks passed
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.

[BUG?] reparent_from_id_append() does not set new parent for the migrating children that have their own children.
2 participants