(&mut self)
| 363 | |
| 364 | impl Drop for PooledBytesMut { |
| 365 | fn drop(&mut self) { |
| 366 | if let Some(buffer) = self.buffer.take() { |
| 367 | // Return buffer to pool through the BufferPool method |
| 368 | // We need to reconstruct the BufferPool temporarily to call return_buffer |
| 369 | let pool = BufferPool { |
| 370 | inner: Arc::clone(&self.pool), |
| 371 | config: self.config.clone(), |
| 372 | }; |
| 373 | pool.return_buffer(buffer); |
| 374 | } |
| 375 | } |
| 376 | } |
| 377 | |
| 378 | /// Global buffer pool instance for shared use across the application |
nothing calls this directly
no test coverage detected