Skip to content

Commit

Permalink
Elide explicit lifetime in draw_img + code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
presiyan-ivanov committed Oct 8, 2023
1 parent b3f4ef5 commit 8cc38b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion renderer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub trait Renderer {

fn draw_svg<'b>(&mut self, svg: Svg<'b>, rect: Rect, brush: Option<impl Into<BrushRef<'b>>>);

fn draw_img<'b>(&mut self, img: Img<'b>, width: u32, height: u32, rect: Rect);
fn draw_img<'b>(&mut self, img: Img<'_>, width: u32, height: u32, rect: Rect);

fn finish(&mut self);
}
8 changes: 1 addition & 7 deletions src/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +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

0 comments on commit 8cc38b8

Please sign in to comment.