Add an iterator over Node's children and replace usages of Node.foreach_child()
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