Skip to content

PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust

style(render): rustfmt the comma-below test (refs #1666)

Tiago Kiel8708cbb93d39
diff --git a/crates/render/src/raster.rs b/crates/render/src/raster.rs
index 5fd0b3b0a..89620d4bc 100644
--- a/crates/render/src/raster.rs
+++ b/crates/render/src/raster.rs
@@ -5804,9 +5804,7 @@ trailer << /Root 1 0 R >>
assert!(p.error.is_none(), "{font}: {:?}", p.error);
// The rows (y down) of the i-th letter that have dark pixels.
let ink_rows = |i: u32| -> Vec<u32> {
- (0..p.height)
- .filter(|y| ((8 + 40 * i)..(48 + 40 * i).min(p.width)).any(|x| p.rgba[((y * p.width + x) * 4) as usize] < 128))
- .collect()
+ (0..p.height).filter(|y| ((8 + 40 * i)..(48 + 40 * i).min(p.width)).any(|x| p.rgba[((y * p.width + x) * 4) as usize] < 128)).collect()
};
for (pair, (_, name)) in pairs.iter().enumerate() {
let (base, accented) = (ink_rows(2 * pair as u32), ink_rows(2 * pair as u32 + 1));