(&mut self, n: usize)
| 49 | #[cfg(feature = "arrayvec")] |
| 50 | #[inline(always)] |
| 51 | pub fn encode_less_than_255(&mut self, n: usize) { |
| 52 | use crate::fast::PushUnchecked; |
| 53 | debug_assert!(n < 255); |
| 54 | unsafe { self.small.push_unchecked(n as u8) }; |
| 55 | } |
| 56 | |
| 57 | /// Encodes lengths less than `N`. Have to reserve `N * i.size_hint().1 elements`. |
| 58 | /// Skips calling encode for T::len() == 0. Returns `true` if it failed due to a length over `N`. |
no test coverage detected