style: rustfmt the tree so the CI lint check passes

This commit is contained in:
Karim Jerbi committed 2026-10-15 04:10:06 +01:00
1 parent 1317a7b4fd
commit 6025d8be44
128 files changed
+4097 -1676

No files matched your search

+18 -4
View File
@@ -185,7 +185,8 @@ fn emit_image(
let mut height = image.height;
let mut pixels: std::borrow::Cow<[u8]> = std::borrow::Cow::Borrowed(image.pixels.as_slice());
if let Some(target) = options.quality.target_dpi() {
let dist = |a: [f32; 2], b: [f32; 2]| ((b[0] - a[0]).powi(2) + (b[1] - a[1]).powi(2)).sqrt();
let dist =
|a: [f32; 2], b: [f32; 2]| ((b[0] - a[0]).powi(2) + (b[1] - a[1]).powi(2)).sqrt();
let width_edge = dist(corners[0], corners[1]);
let height_edge = dist(corners[0], corners[3]);
// A degenerate (zero-area) placement keeps the native pixels.
@@ -208,8 +209,12 @@ fn emit_image(
if let Some(buffer) =
image::RgbaImage::from_raw(width, height, image.pixels.as_ref().clone())
{
let resized =
image::imageops::resize(&buffer, w, h, image::imageops::FilterType::Triangle);
let resized = image::imageops::resize(
&buffer,
w,
h,
image::imageops::FilterType::Triangle,
);
width = w;
height = h;
pixels = std::borrow::Cow::Owned(resized.into_raw());
@@ -751,7 +756,16 @@ fn append_pdf_page(
continue;
}
DrawItem::Image(image) => {
emit_image(doc, image_resources, &mut ops, image, ox, oy, scale, options)?;
emit_image(
doc,
image_resources,
&mut ops,
image,
ox,
oy,
scale,
options,
)?;
continue;
}
DrawItem::Wire(wire) => wire,