diff --git a/core/src/window/icon.rs b/core/src/window/icon.rs index 5ef0eed7..fb34ca32 100644 --- a/core/src/window/icon.rs +++ b/core/src/window/icon.rs @@ -35,7 +35,7 @@ pub fn from_rgba( } /// An window icon normally used for the titlebar or taskbar. -#[derive(Debug, Clone)] +#[derive(Clone)] pub struct Icon { rgba: Vec, size: Size, @@ -48,6 +48,15 @@ impl Icon { } } +impl std::fmt::Debug for Icon { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("Icon") + .field("rgba", &format!("{} pixels", self.rgba.len() / 4)) + .field("size", &self.size) + .finish() + } +} + #[derive(Debug, thiserror::Error)] /// An error produced when using [`from_rgba`] with invalid arguments. pub enum Error {