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 type conversion from &str to Selector #39

Merged
merged 1 commit into from
Mar 18, 2020

Conversation

spegoraro
Copy link
Contributor

Implement TryFrom<&str> for Selector.

This gives us the try_from method as well as the try_into method. Both return a result type the same as that in Selector::parse. Tests added to validate functionality and syntax.

See issue #27 for more background.
See pull request #30 for other work on the syntax but on the select method instead.

Implement TryFrom<&str> for Selector. This gives us the `try_from`
method as well as the `try_into` method. Both return a result type the
same as that in `Selector::parse`.
@mainrs mainrs merged commit 3bb3897 into rust-scraper:master Mar 18, 2020
@spegoraro spegoraro deleted the selector-conversions branch March 19, 2020 03:24
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.

2 participants