Skip to content

Fix bugs, add regression tests, modernize CI, and improve README#3

Merged
antimora merged 2 commits intomainfrom
fix/review-improvements
Feb 18, 2026
Merged

Fix bugs, add regression tests, modernize CI, and improve README#3
antimora merged 2 commits intomainfrom
fix/review-improvements

Conversation

@antimora
Copy link
Owner

Summary

  • Fix invalid Default derive - replaced with manual impl that produces a valid histogram
  • Fix merge() dropping settings - precision and bar_char are now preserved
  • Fix add() panic on NaN - NaN values are silently skipped instead of causing a panic
  • Fix Display division by zero - empty histograms no longer panic when displayed
  • Optimize Display::fmt - bins() called once instead of three times
  • Modernize CI - replace deprecated actions-rs/* with dtolnay/rust-toolchain, bump checkout to v4, add clippy step
  • Improve README - add inline usage examples, features list, fix version, remove broken badge
  • Minor cleanups - remove dead comment, remove unnecessary #[macro_use]
  • Add 4 regression tests covering all bug fixes

All changes are backward compatible.

Test plan

  • All 16 tests pass (12 existing + 4 new regression tests)
  • cargo clippy -- -D warnings clean
  • cargo fmt -- --check clean

- Fix Default derive creating invalid Hstats (manual impl with valid range)
- Fix merge() dropping precision and bar_char settings
- Fix add() panic on NaN input (silently skip)
- Fix Display division by zero on empty histogram
- Optimize Display::fmt to call bins() once instead of three times
- Modernize CI: replace deprecated actions-rs with dtolnay/rust-toolchain
- Add clippy step to CI check job
- Fix README version (0.1.0 -> 0.2.0)
- Remove unnecessary #[macro_use] on extern crate alloc
- Add 4 regression tests for all bug fixes
- Add inline usage example showing basic API
- Add parallel usage snippet showing merge pattern
- Add scannable features bullet list
- Tighten intro description
- Remove broken checks-status badge
- Restructure examples section
@antimora antimora merged commit b2ed73d into main Feb 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments