Skip to content

Commit 36ced5c

Browse files
committed
chore: also disallow async read
1 parent a523bf9 commit 36ced5c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clippy.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
disallowed-methods = [
2+
{ path = "tokio::io::AsyncReadExt::read", reason = "Use `read_exact`, because you likely forgot to use the IO amount. Also see `unused_io_amount` clippy lint." },
23
{ path = "tokio::io::AsyncWriteExt::write", reason = "Use `write_all`, because you likely forgot to use the IO amount. Also see `unused_io_amount` clippy lint." },
34
{ path = "futures_util::future::future::FutureExt::now_or_never", reason = "Tokio might preempt tasks at any time, see https://tokio.rs/blog/2020-04-preemption" }
45
]

0 commit comments

Comments
 (0)