mirror of
https://github.com/Noratrieb/haesli.git
synced 2026-01-16 12:45:04 +01:00
try to fix everything
This commit is contained in:
parent
ac2acbae1f
commit
5dc33f0dab
10 changed files with 1576 additions and 1525 deletions
|
|
@ -41,9 +41,15 @@ pub fn parse_method(payload: &[u8]) -> Result<generated::Class, TransError> {
|
|||
|
||||
match nom_result {
|
||||
Ok(([], class)) => Ok(class),
|
||||
Ok((_, _)) => Err(ProtocolError::ConException(ConException::SyntaxError).into()),
|
||||
Ok((_, _)) => Err(ProtocolError::ConException(ConException::SyntaxError(vec![
|
||||
"could not consume all input".to_string(),
|
||||
]))
|
||||
.into()),
|
||||
Err(nom::Err::Incomplete(_)) => {
|
||||
Err(ProtocolError::ConException(ConException::SyntaxError).into())
|
||||
Err(ProtocolError::ConException(ConException::SyntaxError(vec![
|
||||
"there was not enough data".to_string(),
|
||||
]))
|
||||
.into())
|
||||
}
|
||||
Err(nom::Err::Failure(err) | nom::Err::Error(err)) => Err(err),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue