Skip to content

Commit

Permalink
virtio/net: remove unnecessary closure
Browse files Browse the repository at this point in the history
Let's make clippy happy again.

Signed-off-by: Sergio Lopez <[email protected]>
  • Loading branch information
slp committed Dec 5, 2024
1 parent ce5eac8 commit 3f2adc5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/devices/src/virtio/net/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 3f2adc5

Please sign in to comment.