Skip to content

Commit

Permalink
Make renderer impl's accept img by ref
Browse files Browse the repository at this point in the history
  • Loading branch information
presiyan-ivanov committed Oct 8, 2023
1 parent 8cc38b8 commit db1dfb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ impl floem_renderer::Renderer for Renderer {
}
}

fn draw_img<'b>(&mut self, img: Img, width: u32, height: u32, rect: Rect) {
fn draw_img<'b>(&mut self, img: Img<'_>, width: u32, height: u32, rect: Rect) {
match self {
Renderer::Vger(v) => {
v.draw_img(img, width, height, rect);
Expand Down
2 changes: 1 addition & 1 deletion vger/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ impl Renderer for VgerRenderer {
}
}

fn draw_img<'b>(&mut self, img: Img, img_width: u32, img_height: u32, rect: Rect) {
fn draw_img<'b>(&mut self, img: Img<'_>, img_width: u32, img_height: u32, rect: Rect) {
let transform = self.transform.as_coeffs();
let target_width = (rect.width() * self.scale).round() as u32;
let target_height = (rect.height() * self.scale).round() as u32;
Expand Down

0 comments on commit db1dfb0

Please sign in to comment.