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 sort feature for tree NodeMut #41

Merged
merged 2 commits into from
Dec 9, 2024
Merged

Conversation

AuTa
Copy link
Contributor

@AuTa AuTa commented Dec 8, 2024

This module provides methods for sorting children of a node in a tree.
The sorting can be done based on the node values or their indices.

Resolved #39

@AuTa AuTa marked this pull request as ready for review December 8, 2024 04:37
Cargo.toml Outdated Show resolved Hide resolved
src/sort.rs Outdated Show resolved Hide resolved
src/sort.rs Outdated Show resolved Hide resolved
@AuTa AuTa force-pushed the sort branch 3 times, most recently from 2e8ab17 to 204889b Compare December 8, 2024 12:59
src/sort.rs Outdated Show resolved Hide resolved
src/sort.rs Outdated Show resolved Hide resolved
@AuTa
Copy link
Contributor Author

AuTa commented Dec 8, 2024

In fact, my code sorts the children in each layer but I'm not very good at writing recursion in Rust. 🤦‍

src/sort.rs Outdated Show resolved Hide resolved
@AuTa AuTa force-pushed the sort branch 2 times, most recently from bed9dae to a2f7f0a Compare December 8, 2024 15:04
src/sort.rs Outdated Show resolved Hide resolved
@AuTa AuTa force-pushed the sort branch 2 times, most recently from 314ea42 to 5eb4062 Compare December 8, 2024 15:50
This module provides methods for sorting children of a node in a tree.
The sorting can be done based on the node values or their indices.
@AuTa
Copy link
Contributor Author

AuTa commented Dec 9, 2024

Apologize to the previous git push -f.

@cfvescovo
Copy link
Member

LGTM (and to the CI too, now)

@cfvescovo cfvescovo merged commit 9ec8bec into rust-scraper:master Dec 9, 2024
5 checks passed
@AuTa AuTa deleted the sort branch December 10, 2024 01:27
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.

append_id will remove the node when the new node is the last child
3 participants