in Debug Builds this seems to be about 30 times (!) slower.
In production builds there is no significant speed difference.
less code dupication, centralised iteration
Before I implemented the callback based interface I tried an iterator but I was not RUSTy enough to implement it with the generic Type Region. But still I think some way to access all chunks should be part of the core module functionality and not of the draw.rs part.
My first thought would have been an iterator, but I can ssee how that might get messy. I'll go for this and maybe have a look at the iterator approach some time.
With https://github.com/owengage/fastnbt/commit/93cb55687ea4c08ca768be6f840784eeedbf4c7b in master anvil/draw.rs can be slimmed down a bit. Not sure If you want to use this:
Before I implemented the callback based interface I tried an iterator but I was not RUSTy enough to implement it with the generic Type
Region
. But still I think some way to access all chunks should be part of the core module functionality and not of the draw.rs part.