65d1f83d2c
Clippy helpfully warns about code like this, telling you that you probably meant "write_all": fn say_hi<W:Write>(w: &mut W) { w.write(b"hello").unwrap(); } This patch attempts to extend the lint so it also covers this case: async fn say_hi<W:AsyncWrite>(w: &mut W) { w.write(b"hello").await.unwrap(); } (I've run into this second case several times in my own programming, and so have my coworkers, so unless we're especially accident-prone in this area, it's probably worth addressing?) This patch covers the Async{Read,Write}Ext traits in futures-rs, and in tokio, since both are quite widely used. changelog: [`unused_io_amount`] now supports AsyncReadExt and AsyncWriteExt. |
||
---|---|---|
.. | ||
ast_utils | ||
ast_utils.rs | ||
attrs.rs | ||
comparisons.rs | ||
consts.rs | ||
diagnostics.rs | ||
eager_or_lazy.rs | ||
higher.rs | ||
hir_utils.rs | ||
lib.rs | ||
msrvs.rs | ||
numeric_literal.rs | ||
paths.rs | ||
ptr.rs | ||
qualify_min_const_fn.rs | ||
source.rs | ||
str_utils.rs | ||
sugg.rs | ||
sym_helper.rs | ||
ty.rs | ||
usage.rs | ||
visitors.rs |