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

Timer trait error mismatch #224

Closed
ryankurte opened this issue Jun 18, 2020 · 3 comments
Closed

Timer trait error mismatch #224

ryankurte opened this issue Jun 18, 2020 · 3 comments

Comments

@ryankurte
Copy link
Contributor

ryankurte commented Jun 18, 2020

In the timer trait, the CountDown and Cancel traits share an error definition, but try_wait and try_cancel return different types, which is not ideal for implementation. Discovered in stm32-rs/stm32f4xx-hal#172. I'm not sure of the correct change but, any change would be breaking so a decision on this blocks #177.

cc. @therealprof

@eldruin
Copy link
Member

eldruin commented Jun 18, 2020

Maybe the problem in stm32-rs/stm32f4xx-hal#172 could be solved with a different Error type in CountDown. I left a comment about it here.

We could also discuss whether a common Error type makes sense for these two traits. Separate Error types are possible at the expense of fully-qualified syntax.

@ryankurte
Copy link
Contributor Author

ryankurte commented Jun 19, 2020

Maybe the problem in stm32-rs/stm32f4xx-hal#172 could be solved with a different Error type in CountDown. I left a comment about it here.

Yeah you got it, thanks!

We could also discuss whether a common Error type makes sense for these two traits.

Given my complaint wasn't valid, and sharing error types there seems fine, unless you have a strong opinion I would rather not add this to the list of things to worry about at this time.

@eldruin
Copy link
Member

eldruin commented Jun 20, 2020

Great. Glad to help.

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

2 participants