diff options
Diffstat (limited to '')
-rw-r--r-- | wgpu/src/renderer.rs | 12 | ||||
-rw-r--r-- | wgpu/src/renderer/widget/icon.rs | 12 |
2 files changed, 8 insertions, 16 deletions
diff --git a/wgpu/src/renderer.rs b/wgpu/src/renderer.rs index 9895e1c4..92e24933 100644 --- a/wgpu/src/renderer.rs +++ b/wgpu/src/renderer.rs @@ -243,13 +243,11 @@ impl Renderer { scale: [bounds.width, bounds.height], }); } - Primitive::Svg { handle, bounds } => { - layer.svgs.push(Svg { - handle: handle.clone(), - position: [bounds.x, bounds.y], - scale: [bounds.width, bounds.height], - }) - }, + Primitive::Svg { handle, bounds } => layer.svgs.push(Svg { + handle: handle.clone(), + position: [bounds.x, bounds.y], + scale: [bounds.width, bounds.height], + }), Primitive::Clip { bounds, offset, diff --git a/wgpu/src/renderer/widget/icon.rs b/wgpu/src/renderer/widget/icon.rs index a271bb47..652e57a3 100644 --- a/wgpu/src/renderer/widget/icon.rs +++ b/wgpu/src/renderer/widget/icon.rs @@ -1,15 +1,9 @@ use crate::{svg::Handle, Primitive, Renderer}; -use iced_native::{ - icon, MouseCursor, Rectangle, -}; +use iced_native::{icon, MouseCursor, Rectangle}; use std::path::Path; impl icon::Renderer for Renderer { - fn draw( - &mut self, - bounds: Rectangle, - path: &Path, - ) -> Self::Output { + fn draw(&mut self, bounds: Rectangle, path: &Path) -> Self::Output { ( Primitive::Svg { handle: Handle::from_path(path), @@ -18,4 +12,4 @@ impl icon::Renderer for Renderer { MouseCursor::OutOfBounds, ) } -}
\ No newline at end of file +} |