more things

This commit is contained in:
nora 2022-03-04 23:05:50 +01:00
parent 5d127eceee
commit b6355f5e35
11 changed files with 129 additions and 122 deletions

View file

@ -20,10 +20,10 @@ pub fn parse_method(payload: &[u8]) -> Result<Method, TransError> {
match nom_result {
Ok(([], method)) => Ok(method),
Ok((_, _)) => {
Err(ConException::SyntaxError(vec!["could not consume all input".to_string()]).into())
Err(ConException::SyntaxError(vec!["could not consume all input".to_owned()]).into())
}
Err(nom::Err::Incomplete(_)) => {
Err(ConException::SyntaxError(vec!["there was not enough data".to_string()]).into())
Err(ConException::SyntaxError(vec!["there was not enough data".to_owned()]).into())
}
Err(nom::Err::Failure(err) | nom::Err::Error(err)) => Err(err),
}