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

fix: new clippy lints for single async blocks #514

Open
kilpatty opened this issue Mar 13, 2023 · 0 comments
Open

fix: new clippy lints for single async blocks #514

kilpatty opened this issue Mar 13, 2023 · 0 comments

Comments

@kilpatty
Copy link
Contributor

error: this async expression only awaits a single future [314](https://github.com/OpenPoolProject/stratum/actions/runs/4404426106/jobs/7714018855#step:9:315) --> server/src/connection.rs:69:26 [315](https://github.com/OpenPoolProject/stratum/actions/runs/4404426106/jobs/7714018855#step:9:316) | [316](https://github.com/OpenPoolProject/stratum/actions/runs/4404426106/jobs/7714018855#step:9:317) 69 | tokio::spawn(async move { write_message(cancel_token, rx, self.writer).await }); [317](https://github.com/OpenPoolProject/stratum/actions/runs/4404426106/jobs/7714018855#step:9:318) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: write_message(cancel_token, rx, self.writer)[318](https://github.com/OpenPoolProject/stratum/actions/runs/4404426106/jobs/7714018855#step:9:319) | [319](https://github.com/OpenPoolProject/stratum/actions/runs/4404426106/jobs/7714018855#step:9:320) = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_async_block [320](https://github.com/OpenPoolProject/stratum/actions/runs/4404426106/jobs/7714018855#step:9:321) = note:-D clippy::redundant-async-blockimplied by-D warnings`
321

322
error: this async expression only awaits a single future
323
--> server/src/api/server.rs:65:41
324
|
325
65 | .with_graceful_shutdown(async move { cancel_token.cancelled().await });
326
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: cancel_token.cancelled()
327
|
328
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_async_block
329

330
error: could not compile stratum-server (lib) due to 2 previous errors`

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