(bytes: &mut R)
| 77 | impl<T: Deserialize> Deserialize for Vec<T> { |
| 78 | #[inline(always)] |
| 79 | fn tls_deserialize<R: std::io::Read>(bytes: &mut R) -> Result<Self, Error> { |
| 80 | let (length, len_len) = read_variable_length(bytes)?; |
| 81 | if length == 0 { |
| 82 | // An empty vector. |
| 83 | return Ok(Vec::new()); |
| 84 | } |
| 85 | |
| 86 | let mut result = Vec::new(); |
| 87 | let mut read = len_len; |
| 88 | while (read - len_len) < length as usize { |
| 89 | let element = T::tls_deserialize(bytes)?; |
| 90 | read += element.tls_serialized_len(); |
| 91 | result.push(element); |
| 92 | } |
| 93 | Ok(result) |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | #[inline(always)] |
nothing calls this directly
no test coverage detected