-
Notifications
You must be signed in to change notification settings - Fork 10
Adding sync version of CfuWriter #21
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
Adding sync version of CfuWriter #21
Conversation
4c977d3 to
5cf94f3
Compare
e5fe69b to
93cc60a
Compare
remove send and add noop writer. revmove default impl cargo fmt cargo clippy review fix cargo +nightly fmt fix doc all features cargo fmt line with 100 Noop -> Nop fmt remove send trait, future pr add mut to self in writer trait cargo fmt cargo +nightly fmt try to make the ci fmt works :(
93cc60a to
43eafb0
Compare
Yes |
|
Hi, I looked at the maybe-async-cfg crate. Having a Sync version of CfuWrite is to be used when small packets need to be sent. In that case, the use of a non-async API could result in better performance. In a project containing these use cases, it is expected to use both sync and async versions of the CfuWriter. Adding a feature to the build to have or not the sync version adds lots of complexity and no benefit in this use case. One benefit could be that we do not have to write the trait implementation twice, but since for now it is only four lines, adding a macro to the code and new dependencies seems overkill. |
…ge (#384) There was a breaking change and minor version update (0.2.0) in embedded-cfu via OpenDevicePartnership/embedded-cfu#21. While the necessary changes are integrated, limit version to 0.1.0 for the workspace in cargo.toml
This PR adds a sync version of
CfuWriterand mergedCfuWriterMutwithCfuWriter.CfuWriteris now namedCfuWriterAsyncand the synchronous version is namedCfuWriterSync. To keep the previous behavior, useCfuWriterAsync.CfuWriterNopto be more explicit about what it does.Issues
Fix #5
Fix #17