diff --git a/src/backends/metal/video.rs b/src/backends/metal/video.rs index 9d17d04c..1a9d95ff 100644 --- a/src/backends/metal/video.rs +++ b/src/backends/metal/video.rs @@ -67,7 +67,6 @@ pub struct MetalRenderContext { pub gfx: Rc, } -#[derive(Debug)] pub struct MetalDrmDevice { pub backend: Rc, pub id: DrmDeviceId, @@ -91,6 +90,12 @@ pub struct MetalDrmDevice { pub is_nvidia: bool, } +impl Debug for MetalDrmDevice { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + f.debug_struct("MetalDrmDevice").finish_non_exhaustive() + } +} + impl MetalDrmDevice { pub fn is_render_device(&self) -> bool { if let Some(ctx) = self.backend.ctx.get() { @@ -189,7 +194,6 @@ impl ConnectorDisplayData { } } -#[derive(Debug)] pub struct MetalConnector { pub id: DrmConnector, pub master: Rc, @@ -240,7 +244,12 @@ pub struct MetalConnector { pub direct_scanout_active: Cell, } -#[derive(Debug)] +impl Debug for MetalConnector { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + f.debug_struct("MetalConnnector").finish_non_exhaustive() + } +} + pub struct MetalHardwareCursor { pub generation: u64, pub connector: Rc, @@ -253,6 +262,13 @@ pub struct MetalHardwareCursor { pub have_changes: Cell, } +impl Debug for MetalHardwareCursor { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + f.debug_struct("MetalHardwareCursor") + .finish_non_exhaustive() + } +} + impl HardwareCursor for MetalHardwareCursor { fn set_enabled(&self, enabled: bool) { if self.cursor_enabled_pending.replace(enabled) != enabled { @@ -929,7 +945,6 @@ impl Connector for MetalConnector { } } -#[derive(Debug)] pub struct MetalCrtc { pub id: DrmCrtc, pub idx: usize, @@ -946,6 +961,12 @@ pub struct MetalCrtc { pub mode_blob: CloneCell>>, } +impl Debug for MetalCrtc { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + f.debug_struct("MetalCrtc").finish_non_exhaustive() + } +} + #[derive(Debug)] pub struct MetalEncoder { pub id: DrmEncoder, @@ -965,7 +986,6 @@ pub struct PlaneFormat { modifiers: IndexSet, } -#[derive(Debug)] pub struct MetalPlane { pub id: DrmPlane, pub master: Rc, @@ -993,6 +1013,12 @@ pub struct MetalPlane { pub fb_id: DrmProperty, } +impl Debug for MetalPlane { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + f.debug_struct("MetalPlane").finish_non_exhaustive() + } +} + fn get_connectors( backend: &Rc, dev: &Rc,