rust/tests
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
..
cargo Merge commit 'cb7915b00c' into clippyup 2021-09-28 18:03:12 +01:00
ui Extend [unused_io_amount] to cover AsyncRead and AsyncWrite. 2021-12-31 12:10:59 -05:00
ui-cargo Merge commit '27afd6ade4' into clippyup 2021-09-08 16:31:47 +02:00
ui-internal Merge commit 'a5d597637d' into clippyup 2021-12-06 12:33:31 +01:00
ui-toml Merge commit '23d11428de' into clippyup 2021-12-17 13:40:22 +01:00
ui_test Merge commit '91496c2ac6' into clippyup 2021-10-21 13:11:36 +02:00
clippy.toml Merge commit '3ae8faff4d' into clippyup 2021-06-03 08:41:37 +02:00
compile-test.rs Extend [unused_io_amount] to cover AsyncRead and AsyncWrite. 2021-12-31 12:10:59 -05:00
dogfood.rs Merge commit 'cb7915b00c' into clippyup 2021-09-28 18:03:12 +01:00
fmt.rs Merge commit 'a5d597637d' into clippyup 2021-12-06 12:33:31 +01:00
integration.rs Merge commit 'cb7915b00c' into clippyup 2021-09-28 18:03:12 +01:00
lint_message_convention.rs Merge commit '27afd6ade4' into clippyup 2021-09-08 16:31:47 +02:00
missing-test-files.rs Merge commit 'e181011378' into clippyup 2021-11-04 12:52:36 +00:00
versioncheck.rs Merge commit '27afd6ade4' into clippyup 2021-09-08 16:31:47 +02:00