(&mut self, mut snapshot: ScratchSnapshot)
| 62 | |
| 63 | #[inline] |
| 64 | fn drain_snapshot(&mut self, mut snapshot: ScratchSnapshot) -> Drain<'_, T> { |
| 65 | debug_assert!( |
| 66 | self.buffer.len() >= snapshot.len, |
| 67 | "Scratch buffer snapshots must be restored in reverse order of creation." |
| 68 | ); |
| 69 | snapshot.bomb.defuse(); |
| 70 | self.buffer.drain(snapshot.len..) |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | impl<T> Drop for ScratchBuffer<T> { |
no test coverage detected