diff options
author | 2019-11-24 11:34:30 +0100 | |
---|---|---|
committer | 2019-11-24 11:34:30 +0100 | |
commit | 149fd2aa1fa86858c7c1dcec8fd844caa78cec94 (patch) | |
tree | a199cf8d2caaf6aa60e48e93d6dd0688969d43b0 /wgpu/src/image.rs | |
parent | 9712b319bb7a32848001b96bd84977430f14b623 (diff) | |
parent | 47196c9007d12d3b3e0036ffabe3bf6d14ff4523 (diff) | |
download | iced-149fd2aa1fa86858c7c1dcec8fd844caa78cec94.tar.gz iced-149fd2aa1fa86858c7c1dcec8fd844caa78cec94.tar.bz2 iced-149fd2aa1fa86858c7c1dcec8fd844caa78cec94.zip |
Merge pull request #65 from hecrj/improvement/docs
Documentation
Diffstat (limited to 'wgpu/src/image.rs')
-rw-r--r-- | wgpu/src/image.rs | 10 |
1 files changed, 5 insertions, 5 deletions
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<HashMap<String, Memory>>, @@ -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<image::Bgra<u8>, Vec<u8>>, |