Open z33ky opened 5 years ago
I've missed explaining the motivation for this change.
Well, for one this gets rid of some Vec
s, alleviating the need to allocate dynamic memory during iteration. The Vec
s got reused, so the time-cost got amortized somewhat. However, this is not necessary anymore.
Additionally, the new interface allows to return early or skip the children of certain nodes via the visitor's return-value.
Since the old *Collectors are removed, this is an API-breaking change. They could easily be re-added on top of the Visitors though.