Skip to content

Commit 9b51a8d

Browse files
committed
combined match arms
1 parent 6d822b8 commit 9b51a8d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/renderer.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -490,10 +490,10 @@ fn render_single_page_to_ctx(
490490
// then, get the size of the page
491491
let bounds = page.bounds()?;
492492
let page_dim = match rotate {
493-
RotateDirection::Deg0 => (bounds.x1 - bounds.x0, bounds.y1 - bounds.y0),
494-
RotateDirection::Deg90 => (bounds.y1 - bounds.y0, bounds.x1 - bounds.x0),
495-
RotateDirection::Deg180 => (bounds.x1 - bounds.x0, bounds.y1 - bounds.y0),
496-
RotateDirection::Deg270 => (bounds.y1 - bounds.y0, bounds.x1 - bounds.x0)
493+
RotateDirection::Deg0 | RotateDirection::Deg180 =>
494+
(bounds.x1 - bounds.x0, bounds.y1 - bounds.y0),
495+
RotateDirection::Deg90 | RotateDirection::Deg270 =>
496+
(bounds.y1 - bounds.y0, bounds.x1 - bounds.x0),
497497
};
498498

499499
let scaled = scale_img_for_area(page_dim, (area_w, area_h), fit_or_fill);

0 commit comments

Comments
 (0)