Skip to content

Commit f1b80b5

Browse files
cleanup leftover reference to queue state
The iterator actually receives a queue object as a parameter. Signed-off-by: Andreea Florescu <[email protected]>
1 parent c092a05 commit f1b80b5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crates/virtio-queue/src/queue.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -711,16 +711,16 @@ where
711711
/// * `mem` - the `GuestMemory` object that can be used to access the queue buffers.
712712
/// * `idx` - the index of the available ring entry where the driver would put the next
713713
/// available descriptor chain.
714-
/// * `state` - the `Queue` object from which the needed data to create the `AvailIter` can
714+
/// * `queue` - the `Queue` object from which the needed data to create the `AvailIter` can
715715
/// be retrieved.
716-
pub(crate) fn new(mem: M, idx: Wrapping<u16>, state: &'b mut Queue) -> Self {
716+
pub(crate) fn new(mem: M, idx: Wrapping<u16>, queue: &'b mut Queue) -> Self {
717717
AvailIter {
718718
mem,
719-
desc_table: state.desc_table,
720-
avail_ring: state.avail_ring,
721-
queue_size: state.size,
719+
desc_table: queue.desc_table,
720+
avail_ring: queue.avail_ring,
721+
queue_size: queue.size,
722722
last_index: idx,
723-
next_avail: &mut state.next_avail,
723+
next_avail: &mut queue.next_avail,
724724
}
725725
}
726726

0 commit comments

Comments
 (0)