utkarshkukreti / select.rs

A Rust library to extract useful data from HTML documents, suitable for web scraping.
MIT License
971 stars 69 forks source link

Allow Nodes returned from selection::Iter to outlive their Selection object #16

Closed mystor closed 8 years ago

mystor commented 8 years ago

The Nodes should be able to live as long as their Document object, but are having their lifetimes limited such that they can only live as long as their Selection object.

utkarshkukreti commented 8 years ago

Makes sense. Thank you!

Just curious, are you using this library for any project?

mystor commented 8 years ago

I'm not personally using select.rs for a project, but one of my co-workers was learning rust, and asked me for info as to why the nodes returned from the iterator couldn't outlive the selection, so I wrote up a patch such that they could ^.^. I believe that they are using it for a project.