mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
misc: Fix various clippy issues
Signed-off-by: Bo Chen <chen.bo@intel.com> Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
@@ -106,7 +106,7 @@ impl GuestNetworkConfig {
|
||||
epoll::Event::new(epoll::Events::EPOLLIN, 0),
|
||||
)
|
||||
.expect("Cannot add 'tcp_listener' event to epoll");
|
||||
let mut events = vec![epoll::Event::new(epoll::Events::empty(), 0); 1];
|
||||
let mut events = [epoll::Event::new(epoll::Events::empty(), 0); 1];
|
||||
loop {
|
||||
let num_events = match epoll::wait(epoll_fd, timeout * 1000_i32, &mut events[..]) {
|
||||
Ok(num_events) => Ok(num_events),
|
||||
@@ -251,7 +251,7 @@ impl DiskConfig for UbuntuDiskConfig {
|
||||
.join("cloud-init")
|
||||
.join("ubuntu");
|
||||
|
||||
vec!["meta-data"].iter().for_each(|x| {
|
||||
["meta-data"].iter().for_each(|x| {
|
||||
rate_limited_copy(source_file_dir.join(x), cloud_init_directory.join(x))
|
||||
.expect("Expect copying cloud-init meta-data to succeed");
|
||||
});
|
||||
@@ -307,7 +307,7 @@ impl DiskConfig for UbuntuDiskConfig {
|
||||
.output()
|
||||
.expect("Expect creating disk image to succeed");
|
||||
|
||||
vec!["user-data", "meta-data", "network-config"]
|
||||
["user-data", "meta-data", "network-config"]
|
||||
.iter()
|
||||
.for_each(|x| {
|
||||
std::process::Command::new("mcopy")
|
||||
|
||||
Reference in New Issue
Block a user