-
Notifications
You must be signed in to change notification settings - Fork 125
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
Fix compile errors of stand-alone features #677
Conversation
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 quite understand why the changes with Box
are needed. I assume you had compilation errors. Can you tell me how I can reproduce them?
#[cfg(not(feature = "sync-api"))]
use alloc::boxed::Box;
See the PR description:
For reproducing: Simply remove the |
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.
Now I understood. Thanks
Fixes the compile errors of standalone features. The following was changed:
futures-util
to default import because the async code needs it to compile. Because the sync code does not, I only added the minimum needed package (which is -util and not the fullfutures
).tungstenite-client
andws-client
now include thesync-api
feature, because they are only work in sync mode anyway.#[cfg(not(feature = "sync-api"))] use alloc::boxed::Box;
: async-trait automatically changes async return values into boxed values.closes #644