(n: usize)
| 42 | Ok(out) |
| 43 | } |
| 44 | fn reserve<T>(n: usize) -> FormatResult<Vec<T>> { |
| 45 | let mut v = Vec::new(); |
| 46 | v.try_reserve_exact(n) |
| 47 | .map_err(|_| FormatError::GraphFieldLimitExceeded)?; |
| 48 | Ok(v) |
| 49 | } |
| 50 | impl<'a> Decoder<'a> { |
| 51 | fn parse(payload: &'a [u8]) -> FormatResult<Self> { |
| 52 | if payload.len() > MAX { |