kuchiki-rs / kuchiki

(朽木) HTML/XML tree manipulation library for Rust
MIT License
470 stars 54 forks source link

Actually iterate over each node with Node::select() #3

Closed BenoitZugmeyer closed 9 years ago

BenoitZugmeyer commented 9 years ago

I was looking forward to use this API change, thanks for the great work! I tried to use node.select, but I spoted a rather obvious bug: it only yields the last matching node. This is because the iterator next method is iterating on all values of the internal iterator rather than returning the values.

Here is patch to fix this.

SimonSapin commented 9 years ago

Indeed, good catch!