smol-rs / futures-lite

Futures, streams, and async I/O combinators.
Apache License 2.0
427 stars 25 forks source link

Fix clippy::redundant_guards warning #91

Closed taiki-e closed 6 months ago

taiki-e commented 6 months ago
warning: redundant guard
    --> src/io.rs:2701:28
     |
2701 |                 Ok(buf) if buf.is_empty() => {
     |                            ^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
     = note: `#[warn(clippy::redundant_guards)]` on by default
help: try
     |
2701 -                 Ok(buf) if buf.is_empty() => {
2701 +                 Ok([]) => {
     |

(This lint is not yet available on stable)