Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Only `impl Global` for `DebugBelow` when compiling with `debug_assertions` (#7102)

Marshall Bowers1d794dbb3700
diff --git a/crates/gpui/src/style.rs b/crates/gpui/src/style.rs
index d5209bd5bd0..ef2622e3eb6 100644
--- a/crates/gpui/src/style.rs
+++ b/crates/gpui/src/style.rs
@@ -14,12 +14,13 @@ pub use taffy::style::{
Overflow, Position,
};
-#[cfg(debug_assertions)]
/// Use this struct for interfacing with the 'debug_below' styling from your own elements.
/// If a parent element has this style set on it, then this struct will be set as a global in
/// GPUI.
+#[cfg(debug_assertions)]
pub struct DebugBelow;
+#[cfg(debug_assertions)]
impl Global for DebugBelow {}
/// The CSS styling that can be applied to an element via the `Styled` trait