Nick Mathewson 65d1f83d2c Extend [unused_io_amount] to cover AsyncRead and AsyncWrite.
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.
2021-12-31 12:10:59 -05:00
..
2021-12-13 14:02:41 +11:00
2021-12-25 00:29:29 +09:00
2021-12-25 00:29:24 +09:00
2021-12-13 00:00:51 +00:00
2021-12-13 00:00:51 +00:00
2021-12-13 00:00:51 +00:00
2021-12-13 00:00:51 +00:00
2021-12-25 21:55:20 +08:00
2021-12-13 17:09:16 +00:00
2021-12-26 21:37:57 +08:00
2021-12-26 21:37:57 +08:00
2021-12-26 21:37:57 +08:00
2021-12-26 21:37:57 +08:00
2021-12-26 21:37:57 +08:00
2021-12-22 17:25:44 +01:00
2021-12-13 00:00:51 +00:00
2021-12-13 00:00:51 +00:00
2021-12-23 10:51:17 +01:00
2021-12-23 10:51:17 +01:00
2021-12-23 10:51:17 +01:00
2021-12-12 12:34:21 +00:00
2021-12-12 12:34:21 +00:00
2021-12-23 21:41:25 -08:00
2021-12-23 21:43:44 -08:00