From 8cc38b8c84a96699afd1919f7d3be8715e9a4b73 Mon Sep 17 00:00:00 2001 From: Presiyan Ivanov <15377841+presiyan-ivanov@users.noreply.github.com> Date: Sun, 8 Oct 2023 14:04:53 +0300 Subject: [PATCH] Elide explicit lifetime in draw_img + code formatting --- renderer/src/lib.rs | 2 +- src/renderer.rs | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/renderer/src/lib.rs b/renderer/src/lib.rs index 6ca6f61e..ae7630d8 100644 --- a/renderer/src/lib.rs +++ b/renderer/src/lib.rs @@ -45,7 +45,7 @@ pub trait Renderer { fn draw_svg<'b>(&mut self, svg: Svg<'b>, rect: Rect, brush: Option>>); - 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); } diff --git a/src/renderer.rs b/src/renderer.rs index d8cfb20d..dab0359e 100644 --- a/src/renderer.rs +++ b/src/renderer.rs @@ -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);