noritada / grib-rs

GRIB format parser for Rust
Apache License 2.0
57 stars 9 forks source link

Implementations of `Iterator::size_hint()` return the same length after consuming items #50

Closed noritada closed 1 year ago

noritada commented 1 year ago

Simple Description on the Bug

Iterator::size_hint()s implemented in this library return the same length after consuming items.

As per description in the API reference, the implementation of size_hint() should return the bounds on the remaining length of the iterator.

Steps to Reproduce

  1. Check the length returned by size_hint()
  2. Call next()
  3. Check again the length

Expected Behavior

When consuming items, the returned length of size_hint() decreases.

Actual Behavior

Even after consuming items, the returned length of size_hint() does not change.

Additional Context

No response