maybe-async-rs icon indicating copy to clipboard operation
maybe-async-rs copied to clipboard

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

Open yanshay opened this issue 1 year ago • 0 comments

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?

yanshay avatar Aug 31 '24 20:08 yanshay