Skip to content

Fix lost error in Reduce for single-element streams#72

Merged
destel merged 2 commits intomainfrom
fix/reduce-single
Feb 9, 2026
Merged

Fix lost error in Reduce for single-element streams#72
destel merged 2 commits intomainfrom
fix/reduce-single

Conversation

@destel
Copy link
Copy Markdown
Owner

@destel destel commented Feb 9, 2026

When the input stream contained exactly one element and it was an error, Reduce returned nil, true instead of propagating the error.
Added a test for single-element streams and fixed the bug.
Fixes #71

@destel destel added the bug Something isn't working label Feb 9, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.03%. Comparing base (d1f334c) to head (ca40771).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #72      +/-   ##
==========================================
- Coverage   99.11%   99.03%   -0.08%     
==========================================
  Files          17       17              
  Lines        1016      832     -184     
==========================================
- Hits         1007      824     -183     
+ Misses          9        8       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@destel destel merged commit e813c6a into main Feb 9, 2026
5 of 6 checks passed
@destel destel deleted the fix/reduce-single branch February 9, 2026 09:02
@destel destel changed the title Fix lost error in Reduce for single-element streamsFix/reduce single Fix lost error in Reduce for single-element streams Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reducer does not return an error when the original stream has only 1 item

1 participant