tcbrindle / flux

A C++20 library for sequence-orientated programming
https://tristanbrindle.com/flux/
Boost Software License 1.0
476 stars 29 forks source link

Fix off-by-one in take_adaptor::for_each_while #63

Closed tcbrindle closed 1 year ago

tcbrindle commented 1 year ago

We were decrementing the cursor length member once too many times. This didn't show up in many places because the actual underlying cursor (which we normally care about) was correct, but it caused a strange bug when used in combination with filter.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (d39e3fa) 97.68% compared to head (7e0b456) 97.68%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #63 +/- ## ======================================= Coverage 97.68% 97.68% ======================================= Files 59 59 Lines 1946 1948 +2 ======================================= + Hits 1901 1903 +2 Misses 45 45 ``` | [Impacted Files](https://app.codecov.io/gh/tcbrindle/flux/pull/63?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tristan+Brindle) | Coverage Δ | | |---|---|---| | [include/flux/op/take.hpp](https://app.codecov.io/gh/tcbrindle/flux/pull/63?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tristan+Brindle#diff-aW5jbHVkZS9mbHV4L29wL3Rha2UuaHBw) | `100.00% <100.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/tcbrindle/flux/pull/63/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tristan+Brindle)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.