Merge pull request #1923 from DrM7md:nux/clippy-1-95

This commit is contained in:
Brandon Thomas
2026-10-19 12:19:25 -04:00
2 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -477,7 +477,7 @@ fn kept_vml_drawings_are_charged_to_the_kept_total() {
+ wb.sheets.iter().filter_map(|s| s.preserved.as_ref()).map(|p| p.byte_len()).sum::<usize>(); + wb.sheets.iter().filter_map(|s| s.preserved.as_ref()).map(|p| p.byte_len()).sum::<usize>();
assert!(kept <= one + VML.len() / 2, "kept {kept} bytes"); assert!(kept <= one + VML.len() / 2, "kept {kept} bytes");
assert!(wb.sheet(0).unwrap().preserved.as_ref().is_some_and(|p| p.vml.is_some())); assert!(wb.sheet(0).unwrap().preserved.as_ref().is_some_and(|p| p.vml.is_some()));
assert!(!wb.sheet(1).unwrap().preserved.as_ref().is_some_and(|p| p.vml.is_some())); assert!(wb.sheet(1).unwrap().preserved.as_ref().is_none_or(|p| p.vml.is_none()));
assert!(rep.warnings.iter().any(|w| w.contains("\"Other\"") && w.contains("too large")), "{:?}", rep.warnings); assert!(rep.warnings.iter().any(|w| w.contains("\"Other\"") && w.contains("too large")), "{:?}", rep.warnings);
// Both sheets keep their drawings when there is room. // Both sheets keep their drawings when there is room.
let (wb, _) = read_xlsx(&rich_package_with(CONTENT_TYPES, true)).unwrap(); let (wb, _) = read_xlsx(&rich_package_with(CONTENT_TYPES, true)).unwrap();
+3 -5
View File
@@ -272,11 +272,9 @@ fn globals(stream: &[u8], budget: &mut Budget, report: &mut ReadReport) -> Resul
budget.text(code.len())?; budget.text(code.len())?;
g.formats.insert(ifmt, code); g.formats.insert(ifmt, code);
} }
0x00E0 => { 0x00E0 if g.xf_formats.len() < MAX_XFS => {
if g.xf_formats.len() < MAX_XFS { c.u16()?;
c.u16()?; g.xf_formats.push(c.u16()?);
g.xf_formats.push(c.u16()?);
}
} }
0x00FC => g.sst = shared_strings(&mut c, budget)?, 0x00FC => g.sst = shared_strings(&mut c, budget)?,
0x01AE => { 0x01AE => {