This commit is contained in:
Luke Parker
2024-09-20 04:05:17 -04:00
parent 2e57168a97
commit 23b433fe6c
2 changed files with 13 additions and 7 deletions

View File

@@ -302,7 +302,8 @@ impl Extra {
// `fill_buf` returns the current buffer, filled if empty, only empty if the reader is
// exhausted
while !r.fill_buf()?.is_empty() {
res.0.push(ExtraField::read(r)?);
let Ok(field) = ExtraField::read(r) else { break };
res.0.push(field);
}
Ok(res)
}