Skip to content

Commit fa4699b

Browse files
committed
combined match arms
1 parent 6d822b8 commit fa4699b

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/renderer.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -490,10 +490,8 @@ 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 => (bounds.x1 - bounds.x0, bounds.y1 - bounds.y0),
494+
RotateDirection::Deg90 | RotateDirection::Deg270 => (bounds.y1 - bounds.y0, bounds.x1 - bounds.x0),
497495
};
498496

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

0 commit comments

Comments
 (0)