(&mut self, additional: usize)
| 648 | /// reserving a capacity that fails for the same reasons as [`MutableBuffer::reserve`]. |
| 649 | #[inline] |
| 650 | pub fn extend_zeros(&mut self, additional: usize) { |
| 651 | let new_len = self |
| 652 | .len |
| 653 | .checked_add(additional) |
| 654 | .expect("buffer length overflow"); |
| 655 | self.resize(new_len, 0); |
| 656 | } |
| 657 | |
| 658 | /// # Safety |
| 659 | /// The caller must ensure that the buffer was properly initialized up to `len`. |
no test coverage detected