gfx-rs / gfx

[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
http://gfx-rs.github.io/
Apache License 2.0
5.35k stars 548 forks source link

Consider removing ExactSizeIterator bounds #3609

Closed kvark closed 3 years ago

kvark commented 3 years ago

See https://github.com/NotIntMan/inplace_it/issues/5 Thanks @zakarumych for suggestion! I think it would be good: it's more convenient to not require this, and in some cases the size hint can be better then ExactSizeIterator. For example, repeat() doesn't implement it, so repeat().take() is unusable with the exact size, but it does in fact have the exact size, and the size_hint() reflects that nicely.