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

Fix lifetime in ElementRef::attr return value #154

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

g2p
Copy link
Contributor

@g2p g2p commented Oct 27, 2023

I tried to used the new accessor (from #140) on release and fixed a gotcha.

This allows returning references to the document when the traversal is done in an inner function.

This makes it usable in more contexts.
@cfvescovo
Copy link
Member

Good catch

@cfvescovo cfvescovo merged commit 6e0ac72 into rust-scraper:master Oct 27, 2023
@adamreichold
Copy link
Member

I am running into this as well now that I want to use this new helper method. A 0.18.1 patch release to fix this would be great. (I think this should be backwards compatible as the lifetime is strictly longer.)

@cfvescovo
Copy link
Member

I am releasing the patch

@adamreichold
Copy link
Member

Thank you for investing your time to make the fix available!

# 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.

3 participants