wayland: optimize parsing of fixed-size messages
This commit is contained in:
parent
b745e20f7f
commit
755bfdd661
6 changed files with 92 additions and 25 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue