nix-rust / nix

Rust friendly bindings to *nix APIs
MIT License
2.63k stars 661 forks source link

style: try fixing clippy warning #2341

Closed SteveLauC closed 6 months ago

SteveLauC commented 6 months ago

What does this PR do

Fix the below clippy warning:

error: useless use of `vec!`
    --> test/sys/test_socket.rs:2410:19
     |
2410 |     let mut iov = vec![[IoSliceMut::new(&mut buffer)]];
     |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[[IoSliceMut::new(&mut buffer)]]`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
     = note: `-D clippy::useless-vec` implied by `-D warnings`
     = help: to override `-D warnings` add `#[allow(clippy::useless_vec)]`

Checklist: