Open Tseyang opened 3 years ago
@Tseyang I'm not sure if this is really a tracing::instrument
problem.
There's impl Future for HttpResponse ...
for older versions of actix_web (ex. version 4.0.0-beta.1 re-exposes this: https://docs.rs/actix-http/3.0.0-beta.1/src/actix_http/response.rs.html#284).
In that case the clippy lint saying async_yields_async
is right.
This should't be a problem anymore with the newer versions of actix_web.
I haven't really tested this since opening the issue so feel free to close if its no longer relevant.
Bug Report
Version
On v1.53.0-nightly.
Platform
Description
I tried adding
tracing::instrument
to a function handling anactix_web
endpoint and it triggered clippy'sasync_yields_async
lint. Without the decorator, this doesn't appear. The minimal repro I managed to find was:Running
cargo clippy -- -D warnings
onI expected nothing to happen, but instead:
When I comment out the attribute: