diff options
-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"), + } } } |