From d08365a1318653dbfaeb79166a6d89e018ab465d Mon Sep 17 00:00:00 2001 From: Yu Li Date: Wed, 12 Jul 2023 12:25:25 +0800 Subject: [PATCH] build: Fix beta clippy issue (useless_vec) warning: useless use of `vec!` --> test_infra/src/lib.rs:111:30 | 111 | let mut events = vec![epoll::Event::new(epoll::Events::empty(), 0); 1]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[epoll::Event::new(epoll::Events::empty(), 0); 1]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec = note: `#[warn(clippy::useless_vec)]` on by default Signed-off-by: Yu Li (cherry picked from commit d0dbc7fb4dca1f3141a86246af99a3da5ba02760) --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 5acab28c3..988f338c0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1562,7 +1562,7 @@ mod unit_tests { #[test] fn test_valid_vm_config_vsock() { - vec![ + [ ( vec![ "cloud-hypervisor",