Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add trait to abstract over selectable collections of elements #155

Merged
merged 4 commits into from
Nov 9, 2023
Merged

Add trait to abstract over selectable collections of elements #155

merged 4 commits into from
Nov 9, 2023

Conversation

adamreichold
Copy link
Member

@adamreichold adamreichold commented Oct 28, 2023

Our codebase contains a simpler version of this trait which we use to write helper functions which can be applied both at the top level to Html but also if selection is a multi-step process, i.e. to ElementRef itself, as the scope to which a CSS selector is applied.

Note that this uses generic associated type and hence requires Rust 1.65, c.f. https://blog.rust-lang.org/2022/10/28/gats-stabilization.html.

@cfvescovo
Copy link
Member

LGTM

@cfvescovo cfvescovo merged commit e140459 into rust-scraper:master Nov 9, 2023
@adamreichold adamreichold deleted the selectable-trait branch November 9, 2023 06:13
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants