mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
clippy: Fix codebase to compile with beta toolchain
Fixes the current codebase so that every cargo clippy can be run with the beta toolchain without any error. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
committed by
Rob Bradford
parent
943377e6a3
commit
73e8fd4d72
@@ -94,7 +94,6 @@ impl std::convert::From<Error> for std::io::Error {
|
||||
|
||||
struct VhostUserNetThread {
|
||||
net: NetQueuePair,
|
||||
vring_worker: Option<Arc<VringWorker>>,
|
||||
kill_evt: EventFd,
|
||||
}
|
||||
|
||||
@@ -102,7 +101,6 @@ impl VhostUserNetThread {
|
||||
/// Create a new virtio network device with the given TAP interface.
|
||||
fn new(tap: Tap) -> Result<Self> {
|
||||
Ok(VhostUserNetThread {
|
||||
vring_worker: None,
|
||||
kill_evt: EventFd::new(EFD_NONBLOCK).map_err(Error::CreateKillEventFd)?,
|
||||
net: NetQueuePair {
|
||||
mem: None,
|
||||
@@ -119,7 +117,6 @@ impl VhostUserNetThread {
|
||||
|
||||
pub fn set_vring_worker(&mut self, vring_worker: Option<Arc<VringWorker>>) {
|
||||
self.net.epoll_fd = Some(vring_worker.as_ref().unwrap().as_raw_fd());
|
||||
self.vring_worker = vring_worker;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,11 +342,7 @@ pub fn start_net_backend(backend_command: &str) {
|
||||
}
|
||||
};
|
||||
|
||||
let tap = if let Some(tap) = backend_config.tap.as_ref() {
|
||||
Some(tap.as_str())
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let tap = backend_config.tap.as_deref();
|
||||
|
||||
let net_backend = Arc::new(RwLock::new(
|
||||
VhostUserNetBackend::new(
|
||||
|
||||
Reference in New Issue
Block a user