1
0
Fork 0
forked from wry/wry

wayland: optimize parsing of fixed-size messages

This commit is contained in:
Julian Orth 2026-03-28 22:07:41 +01:00
parent b745e20f7f
commit 755bfdd661
6 changed files with 92 additions and 25 deletions

View file

@ -146,9 +146,7 @@ pub trait ParseFull<'a>: Sized {
impl<'a, T: RequestParser<'a>> ParseFull<'a> for T {
fn parse_full(mut parser: MsgParser<'_, 'a>) -> Result<Self, TestError> {
let res = T::parse(&mut parser)?;
parser.eof()?;
Ok(res)
T::parse(&mut parser).map_err(Into::into)
}
}