Audit timers HAL #3: Remove unwraps#532
Merged
RobertZ2011 merged 2 commits intoOpenDevicePartnership:mainfrom Dec 17, 2025
Merged
Audit timers HAL #3: Remove unwraps#532RobertZ2011 merged 2 commits intoOpenDevicePartnership:mainfrom
RobertZ2011 merged 2 commits intoOpenDevicePartnership:mainfrom
Conversation
2147573 to
80659ed
Compare
80659ed to
1d13ba4
Compare
1d13ba4 to
a612e7b
Compare
RobertZ2011
approved these changes
Dec 17, 2025
Contributor
Author
|
Breaking change announced on Zulip. |
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.
Depends on #531
Resolves #530
This removes the last of the panic paths in the timers HAL by removing unwraps and changing a few constructors to return a
Resultinstead (which introduces a breaking change). A new freq field was added to the PWM struct since originally, we unwrapped in a PWM trait method which does not return aResult. So, we just verify the clock config is valid in the constructor and can use the cached freq in the trait methods.