-
Notifications
You must be signed in to change notification settings - Fork 6
Remove panic path in write_register(), associated with potential incorrect register slicing #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove panic path in write_register(), associated with potential incorrect register slicing #20
Conversation
kurtjd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, though this counts as a breaking change I believe since the BQ25773Error is not marked non_exhaustive.
I realized i never published this crate, so i added a commit here that enables the semver check. It will fail for now, but once i get 2 approvals, i will cargo publish and re-run CI and i should be able to merge then |
asasine
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non-blocking
7996230 to
7dcb29b
Compare
This pull request introduces several improvements and fixes to the project, focusing on error handling in the register interface, lint configuration, and CI workflow enhancements. The most significant changes are grouped below by theme.
Error Handling and Robustness:
RegisterSizeErrorvariant to theBQ25773Errorenum and updated the async register write implementation insrc/lib.rsto explicitly check buffer sizes and return this error if the data does not fit, instead of usingdebug_assert!. This improves runtime safety and error reporting. [1] [2] [3]clippy::unwrap_used, ensuring that test code does not fail linting due to unwrap usage.Lint and Metadata Improvements:
Cargo.tomlkeywords to better reflect the crate’s scope, and updated clippy lint settings to use stricter enforcement (denyinstead offorbid) and to add more lint categories for improved code quality. [1] [2]Continuous Integration Enhancements:
semverjob in the GitHub Actions workflow (.github/workflows/check.yml) to check for semantic versioning compatibility on each run, improving release safety.