(&self)
| 390 | #[inline(always)] |
| 391 | #[must_use] |
| 392 | pub fn capacity(&self) -> usize { |
| 393 | // Note: This shouldn't use A::CAPACITY, because unsafe code can't rely on |
| 394 | // any Array invariants. This ensures that at the very least, the returned |
| 395 | // value is a valid length for a subslice of the backing array. |
| 396 | self.data.as_slice().len().min(u16::MAX as usize) |
| 397 | } |
| 398 | |
| 399 | /// Truncates the `ArrayVec` down to length 0. |
| 400 | #[inline(always)] |
no test coverage detected