1
0
Fork 0
forked from wry/wry

all: address clippy issues

This commit is contained in:
Julian Orth 2023-02-04 14:20:10 +01:00
parent 9c7299234a
commit 036af4abaa
10 changed files with 23 additions and 13 deletions

View file

@ -218,7 +218,7 @@ impl<'a> PwParser<'a> {
packed: bool,
) -> Result<PwPod<'a>, PwParserError> {
let size = if packed { len } else { (len + 7) & !7 };
if self.len() < size as usize {
if self.len() < size {
return Err(PwParserError::UnexpectedEof);
}
let val = match ty {
@ -278,7 +278,7 @@ impl<'a> PwParser<'a> {
}
_ => return Err(PwParserError::UnknownType(ty)),
};
self.pos += size as usize;
self.pos += size;
Ok(val)
}