(queue_size: u16)
| 40 | } |
| 41 | impl QueueFreeDescs { |
| 42 | pub fn new(queue_size: u16) -> Self { |
| 43 | let mut free = Vec::with_capacity(queue_size as usize); |
| 44 | for i in 0..queue_size { |
| 45 | free.push(i as u16); |
| 46 | } |
| 47 | Self { free } |
| 48 | } |
| 49 | pub fn get_free(&mut self) -> Option<u16> { |
| 50 | self.free.pop() |
| 51 | } |
nothing calls this directly
no outgoing calls
no test coverage detected