RS.CLIPPY.REDUNDANT_ASYNC_BLOCK
`async { future.await }` can be replaced by `future`
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: redundant_async_block. Copyright ©2025 The Rust Team. All rights reserved.
What it does
Checks for async block that only returns await on a future.
Why is this bad?
It is simpler and more efficient to use the future directly.
Example
let f = async {
1 + 2
};
let fut = async {
f.await
};
Use instead:
let f = async {
1 + 2
};
let fut = f;