Skip to content
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

STM32 RTC set_datetime returns a result but cannot fail #3535

Open
kingofpayne opened this issue Nov 14, 2024 · 0 comments
Open

STM32 RTC set_datetime returns a result but cannot fail #3535

kingofpayne opened this issue Nov 14, 2024 · 0 comments

Comments

@kingofpayne
Copy link
Contributor

In:

pub fn set_datetime(&mut self, t: DateTime) -> Result<(), RtcError> {

RTC::set_datetime method returns a Result<(), RtcError>, but implementation shows this method always returns Ok

This either lacks a check or error forwarding, as the docstring suggest:

Will return RtcError::InvalidDateTime if the datetime is not a valid range.

or maybe it could be simplified and not return any value.

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

No branches or pull requests

1 participant