Takes an unused chunk from this pool or creates a new chunk if none are available. New chunks are not actually allocated, but will be, on first use.
(&mut self)
| 133 | /// New chunks are not actually allocated, |
| 134 | /// but will be, on first use. |
| 135 | fn take(&mut self) -> Vec<u8> { |
| 136 | self.free_chunks.pop().unwrap_or_default() |
| 137 | } |
| 138 | |
| 139 | /// Return a chunk back to the pool, or frees it, as appropriate. |
| 140 | /// |