Drop dep `tokio`'s `io-util` feat as it broke MSRV and isn't useful
authorMatt Corallo <git@bluematt.me>
Mon, 28 Aug 2023 18:39:04 +0000 (18:39 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 28 Aug 2023 21:16:54 +0000 (21:16 +0000)
commiteb882a69b6c5b841b19e05494cfe0f09289b6af1
tree783b18d46381d7e5f0a7fbebcc7987b95a9e28ee
parent61d896d5193bad813ce53cc823e9f2afa17e09a8
Drop dep `tokio`'s `io-util` feat as it broke MSRV and isn't useful

We use `tokio`'s `io-util` feature to provide the
`Async{Read,Write}Ext` traits, which allow us to simply launch a
read future or `poll_write` directly as well as `split` the
`TcpStream` into a read/write half. However, these traits aren't
actually doing much for us - they are really just wrapping the
`readable` future (which we can trivially use ourselves) and
`poll_write` isn't doing anything for us that `poll_write_ready`
can't.

Similarly, the split logic is actually just `Arc`ing the
`TcpStream` and busy-waiting when an operation is busy to prevent
concurrent reads/writes. However, there's no reason to prevent
concurrent access at the stream level - we aren't ever concurrently
writing or reading (though we may concurrently read and write,
which is fine).

Worse, the `io-util` feature broke MSRV (though they're likely to
fix this upstream) and carries two additional dependencies (only
one on the latest upstream tokio).

Thus, we simply drop the dependency here.

Fixes #2527.
lightning-net-tokio/Cargo.toml
lightning-net-tokio/src/lib.rs