Skip to content

Commit 7970f73

Browse files
committed
refactor(queue): remove do from do_pop_unchecked
Rename `do_pop_unchecked` to just `pop_unchecked`. Save couple bytes on the disk. Signed-off-by: Egor Lazarchuk <[email protected]>
1 parent b043c68 commit 7970f73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/vmm/src/devices/virtio/queue.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ impl Queue {
541541
return None;
542542
}
543543

544-
self.do_pop_unchecked()
544+
self.pop_unchecked()
545545
}
546546

547547
/// Try to pop the first available descriptor chain from the avail ring.
@@ -555,15 +555,15 @@ impl Queue {
555555
return None;
556556
}
557557

558-
self.do_pop_unchecked()
558+
self.pop_unchecked()
559559
}
560560

561561
/// Pop the first available descriptor chain from the avail ring.
562562
///
563563
/// # Important
564564
/// This is an internal method that ASSUMES THAT THERE ARE AVAILABLE DESCRIPTORS. Otherwise it
565565
/// will retrieve a descriptor that contains garbage data (obsolete/empty).
566-
fn do_pop_unchecked(&mut self) -> Option<DescriptorChain> {
566+
fn pop_unchecked(&mut self) -> Option<DescriptorChain> {
567567
// This fence ensures all subsequent reads see the updated driver writes.
568568
fence(Ordering::Acquire);
569569

0 commit comments

Comments
 (0)