-
Notifications
You must be signed in to change notification settings - Fork 14
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
implement embedded-hal-async traits using maybe-async-cfg #31
Conversation
@@ -102,6 +102,7 @@ | |||
//! ``` | |||
|
|||
#![deny(unsafe_code, missing_docs)] | |||
#![allow(async_fn_in_trait)] |
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.
I don't think we actually want this. However, fixing the warning is going to take writing a bunch of boilerplate, I'm afraid
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.
I agree and would leave it as-is.
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 to me so far, thank you!
Could you also update the MSRV to Rust 1.75.0 and add a note about it in the changelog? Then the CI should stop complaining. |
…return Poll::pending instead of nb::WouldBlock in case no data is ready
@eldruin I'm having some trouble getting the tests to run for Sadly, the attributes don't seem to work together all that well. Can you maybe have a look? |
The tests themselves in hdoordt@ded90ca work fine for me after adding a single |
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.
The micro:bit example looks great :)
Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
Problem is that now the sync tests don't work anymore. I'll leave the async testing out if it's all the same to you. However, the test coverage is regressing, which makes CI fail. |
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 great. Just one trivial thing left: Could you fix the code formatting?
Done and done. Could you create a release that includes this feature to crates.io? I'd like to use the driver in a training. |
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.
Great work, thank you!
I have released this in version 1.1.0. |
Fixes #30
To do:
#[doc = include_str!("delay.md")]
'[ ] Test async stuff