diff options
author | 2020-02-26 20:47:37 +0100 | |
---|---|---|
committer | 2020-02-26 20:49:40 +0100 | |
commit | bb397cc66808dad14eace4fa40edf2e9bebf42bb (patch) | |
tree | 9d50d242a2a9df649022d97884c232cebb45b0a2 /wgpu/src/image | |
parent | 271725faa585ba14207a9bb27ab95fe27473279d (diff) | |
download | iced-bb397cc66808dad14eace4fa40edf2e9bebf42bb.tar.gz iced-bb397cc66808dad14eace4fa40edf2e9bebf42bb.tar.bz2 iced-bb397cc66808dad14eace4fa40edf2e9bebf42bb.zip |
Move `Debug` implementation for `vector::Svg`
Diffstat (limited to 'wgpu/src/image')
-rw-r--r-- | wgpu/src/image/vector.rs | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/wgpu/src/image/vector.rs b/wgpu/src/image/vector.rs index e7eb4906..6b12df54 100644 --- a/wgpu/src/image/vector.rs +++ b/wgpu/src/image/vector.rs @@ -20,15 +20,7 @@ impl Svg { } } -impl std::fmt::Debug for Svg { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Svg::Loaded(_) => write!(f, "Svg::Loaded"), - Svg::NotFound => write!(f, "Svg::NotFound"), - } - } -} - +#[derive(Debug)] pub struct Cache { svgs: HashMap<u64, Svg>, rasterized: HashMap<(u64, u32, u32), atlas::Entry>, @@ -149,8 +141,11 @@ impl Cache { } } -impl std::fmt::Debug for Cache { +impl std::fmt::Debug for Svg { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "vector::Cache") + match self { + Svg::Loaded(_) => write!(f, "Svg::Loaded"), + Svg::NotFound => write!(f, "Svg::NotFound"), + } } } |