(&mut self, additional: usize)
| 172 | /// allocation failure. |
| 173 | #[inline] |
| 174 | pub fn reserve_exact(&mut self, additional: usize) -> Result<(), OutOfMemory> { |
| 175 | self.inner |
| 176 | .try_reserve_exact(additional) |
| 177 | .map_err(|_| OutOfMemory::new(self.len().saturating_add(additional))) |
| 178 | } |
| 179 | |
| 180 | /// Same as [`std::string::String::push`] but returns an error on allocation |
| 181 | /// failure. |
no test coverage detected