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

user needs to add selectors crate to Cargo.toml in order to use add_class #105

Closed
ctm opened this issue Feb 22, 2023 · 0 comments · Fixed by #108
Closed

user needs to add selectors crate to Cargo.toml in order to use add_class #105

ctm opened this issue Feb 22, 2023 · 0 comments · Fixed by #108

Comments

@ctm
Copy link

ctm commented Feb 22, 2023

This is a super low priority nit.

I added scraper to a little tool I've written and found that in order to use Element::has_class, I need to add the selectors crate to my Cargo.toml file and I need to pin it to the version of selectors that scraper is using.

I had to do that because nothing re-exports CaseSensitivity.

Adding pub to the use line in src/node.rs:

use selectors::attr::CaseSensitivity;

i.e.,

pub use selectors::attr::CaseSensitivity;

allows me to remove selectors from Cargo.toml and just use scraper::node::CaseSensitivity.

It may be that exposing CaseSensitivity somewhere other than the node module makes more sense.

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 a pull request may close this issue.

1 participant