diff --git a/crates/gpui2/src/color.rs b/crates/gpui2/src/color.rs index b128ea691c188247a1d47057b653c93c246f6571..11590f967cdba57edebf52a23fd1721cbf1fc899 100644 --- a/crates/gpui2/src/color.rs +++ b/crates/gpui2/src/color.rs @@ -160,15 +160,6 @@ pub fn black() -> Hsla { } } -pub fn white() -> Hsla { - Hsla { - h: 0., - s: 0., - l: 1., - a: 1., - } -} - impl From for Hsla { fn from(color: Rgba) -> Self { let r = color.r; diff --git a/crates/gpui2/src/elements/text.rs b/crates/gpui2/src/elements/text.rs index 3ee35eea3078475c4c13939c319b3d1819eee8dc..323b3d9f89ef19e356059a558795809e6e8b0cde 100644 --- a/crates/gpui2/src/elements/text.rs +++ b/crates/gpui2/src/elements/text.rs @@ -12,21 +12,11 @@ use parking_lot::Mutex; use std::sync::Arc; use util::arc_cow::ArcCow; -impl IntoElement for ArcCow<'static, str> { +impl>> IntoElement for S { type Element = Text; fn into_element(self) -> Self::Element { - Text { text: self } - } -} - -impl IntoElement for &'static str { - type Element = Text; - - fn into_element(self) -> Self::Element { - Text { - text: ArcCow::from(self), - } + Text { text: self.into() } } } diff --git a/crates/gpui2/src/gpui2.rs b/crates/gpui2/src/gpui2.rs index b10b6629b592c9ddbe798bace1fac119f7961fcd..355697595ff2fc6e6d610b8ce7ce4d4cd8126c4c 100644 --- a/crates/gpui2/src/gpui2.rs +++ b/crates/gpui2/src/gpui2.rs @@ -6,7 +6,6 @@ pub mod interactive; pub mod style; pub mod view; pub mod view_context; -pub mod view_handle; pub use color::*; pub use element::{AnyElement, Element, IntoElement, Layout, ParentElement}; diff --git a/crates/gpui2/src/style.rs b/crates/gpui2/src/style.rs index dc25bb4b22149b90642e91867cd725a4a9fd74ee..ecb9d79a6c47f4011550049282616ca68c6193d3 100644 --- a/crates/gpui2/src/style.rs +++ b/crates/gpui2/src/style.rs @@ -22,8 +22,6 @@ use gpui2_macros::styleable_helpers; use refineable::{Refineable, RefinementCascade}; use std::sync::Arc; -pub type StyleCascade = RefinementCascade