Skip to content

Commit

Permalink
fix formatting for cranky
Browse files Browse the repository at this point in the history
  • Loading branch information
amPerl committed Jan 15, 2024
1 parent d9d7eab commit 1bb7124
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/egui_extras/src/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,23 +248,23 @@ pub fn load_svg_bytes_with_size(
Some(SizeHint::Size(w, h)) => {
size = size.scale_to(
IntSize::from_wh(w, h).ok_or_else(|| format!("Failed to scale SVG to {w}x{h}"))?,
)
);
}
Some(SizeHint::Height(h)) => {
size = size
.scale_to_height(h)
.ok_or_else(|| format!("Failed to scale SVG to height {h}"))?
.ok_or_else(|| format!("Failed to scale SVG to height {h}"))?;
}
Some(SizeHint::Width(w)) => {
size = size
.scale_to_width(w)
.ok_or_else(|| format!("Failed to scale SVG to width {w}"))?
.ok_or_else(|| format!("Failed to scale SVG to width {w}"))?;
}
Some(SizeHint::Scale(z)) => {
let z_inner = z.into_inner();
size = size
.scale_by(z_inner)
.ok_or_else(|| format!("Failed to scale SVG by {}", z_inner))?
.ok_or_else(|| format!("Failed to scale SVG by {z_inner}"))?;
}
};
let (w, h) = (size.width(), size.height());
Expand Down

0 comments on commit 1bb7124

Please sign in to comment.