From f943764a292837cbf262a4f29dc0021d808852d6 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 24 Nov 2019 10:44:55 +0100 Subject: Fix `iced_native` widget examples --- wgpu/src/renderer/widget/image.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'wgpu/src') diff --git a/wgpu/src/renderer/widget/image.rs b/wgpu/src/renderer/widget/image.rs index fe594365..0006dde1 100644 --- a/wgpu/src/renderer/widget/image.rs +++ b/wgpu/src/renderer/widget/image.rs @@ -1,15 +1,15 @@ use crate::{Primitive, Renderer}; -use iced_native::{image, Image, Layout, MouseCursor}; +use iced_native::{image, Layout, MouseCursor}; impl image::Renderer for Renderer { fn dimensions(&self, path: &str) -> (u32, u32) { self.image_pipeline.dimensions(path) } - fn draw(&mut self, image: &Image, layout: Layout<'_>) -> Self::Output { + fn draw(&mut self, path: &str, layout: Layout<'_>) -> Self::Output { ( Primitive::Image { - path: image.path.clone(), + path: String::from(path), bounds: layout.bounds(), }, MouseCursor::OutOfBounds, -- cgit