becheran / grid

Two dimensional grid data structure
MIT License
82 stars 27 forks source link

Add ExactSize and DoubleEnded impls to GridRow and Col Iter #52

Closed luca3s closed 5 months ago

luca3s commented 5 months ago

I wrote implementations of ExactSizeIterator and DoubleEndedIterator for GridRowIter and GridColIter.

The changes to Iterator are bigger than actually needed, but now the next and next_back functions look very similar. Iterator still passes all test. I also added tests for all new code.

Maybe closes https://github.com/becheran/grid/issues/38, which i just notices while writing this.