(&mut self, mut snapshot: ScratchSnapshot)
| 49 | |
| 50 | #[inline] |
| 51 | pub(super) fn take_thin_vec(&mut self, mut snapshot: ScratchSnapshot) -> ThinVec<T> { |
| 52 | if self.is_empty(&snapshot) { |
| 53 | snapshot.bomb.defuse(); |
| 54 | return ThinVec::new(); |
| 55 | } |
| 56 | |
| 57 | let drain = self.drain_snapshot(snapshot); |
| 58 | let mut result = ThinVec::with_capacity(drain.len()); |
| 59 | result.extend(drain); |
| 60 | result |
| 61 | } |
| 62 | |
| 63 | #[inline] |
| 64 | fn drain_snapshot(&mut self, mut snapshot: ScratchSnapshot) -> Drain<'_, T> { |
no test coverage detected