(&mut self, t: &Option<T>)
| 23 | impl<T: Encode> Encoder<Option<T>> for OptionEncoder<T> { |
| 24 | #[inline(always)] |
| 25 | fn encode(&mut self, t: &Option<T>) { |
| 26 | self.variants.encode(&(t.is_some() as u8)); |
| 27 | if let Some(t) = t { |
| 28 | self.some.reserve(NonZeroUsize::new(1).unwrap()); |
| 29 | self.some.encode(t); |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | fn encode_vectored<'a>(&mut self, i: impl Iterator<Item = &'a Option<T>> + Clone) |
| 34 | where |
no test coverage detected