From 3f2adc51399293dc3d7d109ae2fd0d132c15ee03 Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Thu, 5 Dec 2024 19:33:35 +0100 Subject: [PATCH] virtio/net: remove unnecessary closure Let's make clippy happy again. Signed-off-by: Sergio Lopez --- src/devices/src/virtio/net/worker.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/devices/src/virtio/net/worker.rs b/src/devices/src/virtio/net/worker.rs index fb669058..d07f905e 100644 --- a/src/devices/src/virtio/net/worker.rs +++ b/src/devices/src/virtio/net/worker.rs @@ -398,9 +398,7 @@ impl NetWorker { let mut result: std::result::Result<(), FrontendError> = Ok(()); let queue = &mut self.queues[RX_INDEX]; - let head_descriptor = queue - .pop(&self.mem) - .ok_or_else(|| FrontendError::EmptyQueue)?; + let head_descriptor = queue.pop(&self.mem).ok_or(FrontendError::EmptyQueue)?; let head_index = head_descriptor.index; let mut frame_slice = &self.rx_frame_buf[..self.rx_frame_buf_len];