Add more Debug implementations

I generally like to implement Debug on these kind of types.
This commit is contained in:
John Nunley 2023-07-07 21:44:21 -07:00
parent 7d50d17369
commit 440d24ffa0
No known key found for this signature in database
GPG key ID: 42B2FA4582BB1EC9
15 changed files with 38 additions and 1 deletions

View file

@ -4,6 +4,7 @@
use alloc::collections::BTreeMap as Map;
#[cfg(not(feature = "std"))]
use alloc::vec::Vec;
use core::fmt;
#[cfg(feature = "std")]
use std::collections::HashMap as Map;
use swash::scale::{image::Content, ScaleContext};
@ -96,6 +97,12 @@ pub struct SwashCache {
pub outline_command_cache: Map<CacheKey, Option<Vec<swash::zeno::Command>>>,
}
impl fmt::Debug for SwashCache {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.pad("SwashCache { .. }")
}
}
impl SwashCache {
/// Create a new swash cache
pub fn new() -> Self {