Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ssx/async_algorithm: disallow passing a coroutine to ssx::async_for_each
In fact fail the compliation if the function returns non-void [[nodiscard]], which holds for coroutines thanks to ss::future class [[nodiscard]] annotation. Calling ssx::async_for_each of course does not make much sense, as its purpose is to inject scheduling points. However it can be done by mistake, e.g. when a function return type was changed from void to ss::future<>.
- Loading branch information