()
| 15 | |
| 16 | impl RecycleAllocator { |
| 17 | pub fn new() -> Self { |
| 18 | RecycleAllocator { |
| 19 | current: 0, |
| 20 | recycled: Vec::new(), |
| 21 | } |
| 22 | } |
| 23 | pub fn alloc(&mut self) -> usize { |
| 24 | if let Some(id) = self.recycled.pop() { |
| 25 | id |
nothing calls this directly
no test coverage detected