Skip to content

EffectCraft: An open-source motion graphics and compositing tool written by scratch in pure Rust

pdf: inline_len returns the checked product directly (clippy)

bflatastic6f2f98b3982d
diff --git a/crates/pdf/src/image.rs b/crates/pdf/src/image.rs
index 69ff911e7..2c8adda67 100644
--- a/crates/pdf/src/image.rs
+++ b/crates/pdf/src/image.rs
@@ -85,7 +85,7 @@ pub(crate) fn inline_len(file: &File, d: &Dict, res: Option<&Dict>) -> Option<us
// `Width`/`Height` come straight from the file and can be enormous: fall back to the
// `EI` scan (the caller's `None` branch) instead of overflowing the arithmetic.
let row = w.checked_mul(n)?.checked_mul(bpc)?.div_ceil(8);
- Some(row.checked_mul(h)?)
+ row.checked_mul(h)
}
/// Decode an image's samples (all filters, including DCT). Returns (bytes, components from