Fix bugs, add regression tests, modernize CI, and improve README#3
Merged
Fix bugs, add regression tests, modernize CI, and improve README#3
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Defaultderive - replaced with manual impl that produces a valid histogrammerge()dropping settings -precisionandbar_charare now preservedadd()panic on NaN - NaN values are silently skipped instead of causing a panicDisplaydivision by zero - empty histograms no longer panic when displayedDisplay::fmt-bins()called once instead of three timesactions-rs/*withdtolnay/rust-toolchain, bumpcheckoutto v4, add clippy step#[macro_use]All changes are backward compatible.
Test plan
cargo clippy -- -D warningscleancargo fmt -- --checkclean