(input: &[u8])
| 176 | } |
| 177 | |
| 178 | async fn parse_auth_message_safely(input: &[u8]) -> Result<AuthenticationRequest, Box<dyn std::error::Error>> { |
| 179 | let mut cursor = Cursor::new(input); |
| 180 | let parser = MessageParser::new(); |
| 181 | |
| 182 | match parser.parse_auth_request(&mut cursor).await { |
| 183 | Ok(msg) => Ok(msg), |
| 184 | Err(e) => Err(Box::new(e)) |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | async fn parse_query_message_safely(input: &[u8]) -> Result<FrontendMessage, Box<dyn std::error::Error>> { |
| 189 | let mut cursor = Cursor::new(input); |
no test coverage detected