Skip to content

Add an iterator over Node's children and replace usages of Node.foreach_child()

Ivan Molodetskikh requested to merge YaLTeR/librsvg:node-iter-children into master

Closes #229 (closed).

I added Node.children() which returns an iterator over Node's children and replaced existing usages of Node.foreach_child() with iteration.

I decided to call it .children() as opposed to .iter_children() since it's common in Rust (see for instance str.chars(), str.bytes(), slice.chunks()).

I had to move the comment on an unrelated line because it was making it too long (104 characters) and rustfmt in the CI was complaining.

Edited by Ivan Molodetskikh

Merge request reports