From 6a0e442ad68c2b104b7e91ef80798610a79aca6b Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 22 Nov 2019 22:14:24 +0100 Subject: Write docs for `iced_wgpu` --- wgpu/src/image.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'wgpu/src/image.rs') diff --git a/wgpu/src/image.rs b/wgpu/src/image.rs index 75cfa166..96c9ab6d 100644 --- a/wgpu/src/image.rs +++ b/wgpu/src/image.rs @@ -1,11 +1,9 @@ use crate::Transformation; use iced_native::Rectangle; -use std::cell::RefCell; -use std::collections::HashMap; -use std::mem; -use std::rc::Rc; +use std::{cell::RefCell, collections::HashMap, mem, rc::Rc}; +#[derive(Debug)] pub struct Pipeline { cache: RefCell>, @@ -207,7 +205,8 @@ impl Pipeline { if !self.cache.borrow().contains_key(path) { let image = image::open(path).expect("Load image").to_bgra(); - self.cache + let _ = self + .cache .borrow_mut() .insert(path.to_string(), Memory::Host { image }); } @@ -308,6 +307,7 @@ impl Pipeline { } } +#[derive(Debug)] enum Memory { Host { image: image::ImageBuffer, Vec>, -- cgit