Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
gpui: Allow DisplayId to be compared to u32 (#27895)
Terminal90f30b5c200d
diff --git a/crates/gpui/src/platform.rs b/crates/gpui/src/platform.rsindex c118aa6249f..4a6ebc92f8e 100644--- a/crates/gpui/src/platform.rs+++ b/crates/gpui/src/platform.rs@@ -274,6 +274,12 @@ pub struct ScreenCaptureFrame(pub PlatformScreenCaptureFrame);#[derive(PartialEq, Eq, Hash, Copy, Clone)]pub struct DisplayId(pub(crate) u32);+impl From<DisplayId> for u32 {+ fn from(id: DisplayId) -> Self {+ id.0+ }+}+impl Debug for DisplayId {fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {write!(f, "DisplayId({})", self.0)