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

warning: use of async fn in public traits is discouraged as auto trait bounds cannot be specified #25

Open
yanshay opened this issue Aug 31, 2024 · 0 comments

Comments

@yanshay
Copy link

yanshay commented Aug 31, 2024

When using #[maybe_async::maybe_async(AFIT)] on public traits, I get the following warning:

use of "async fn" in public traits is discouraged as auto trait bounds cannot be specified.

I understand why it's there and can fix it by providing two traits, one for sync and another for async, but maybe there's some better way to avoid it and have maybe_async deal with it so I don't duplicate interfaces?

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