Derive Debug for raster::Memory
This commit is contained in:
parent
deedf6e8b6
commit
271725faa5
1 changed files with 1 additions and 11 deletions
|
|
@ -2,6 +2,7 @@ use crate::texture::atlas::{self, Atlas};
|
||||||
use iced_native::image;
|
use iced_native::image;
|
||||||
use std::collections::{HashMap, HashSet};
|
use std::collections::{HashMap, HashSet};
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub enum Memory {
|
pub enum Memory {
|
||||||
Host(::image::ImageBuffer<::image::Bgra<u8>, Vec<u8>>),
|
Host(::image::ImageBuffer<::image::Bgra<u8>, Vec<u8>>),
|
||||||
Device(atlas::Entry),
|
Device(atlas::Entry),
|
||||||
|
|
@ -20,17 +21,6 @@ impl Memory {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl std::fmt::Debug for Memory {
|
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
||||||
match self {
|
|
||||||
Memory::Host(_) => write!(f, "Memory::Host"),
|
|
||||||
Memory::Device(_) => write!(f, "Memory::Device"),
|
|
||||||
Memory::NotFound => write!(f, "Memory::NotFound"),
|
|
||||||
Memory::Invalid => write!(f, "Memory::Invalid"),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Cache {
|
pub struct Cache {
|
||||||
map: HashMap<u64, Memory>,
|
map: HashMap<u64, Memory>,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue