ui2: Remove ElementExt
trait
This commit is contained in:
parent
6784ccd9fe
commit
ed233d583f
3 changed files with 2 additions and 29 deletions
|
@ -1,25 +0,0 @@
|
|||
use gpui2::Element;
|
||||
|
||||
pub trait ElementExt<V: 'static>: Element<V> {
|
||||
// fn when(mut self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
|
||||
// where
|
||||
// Self: Sized,
|
||||
// {
|
||||
// if condition {
|
||||
// self = then(self);
|
||||
// }
|
||||
// self
|
||||
// }
|
||||
|
||||
// fn when_some<T, U>(mut self, option: Option<T>, then: impl FnOnce(Self, T) -> U) -> U
|
||||
// where
|
||||
// Self: Sized,
|
||||
// {
|
||||
// if let Some(value) = option {
|
||||
// self = then(self, value);
|
||||
// }
|
||||
// self
|
||||
// }
|
||||
}
|
||||
|
||||
impl<S: 'static, E: Element<S>> ElementExt<S> for E {}
|
|
@ -18,7 +18,6 @@
|
|||
#![allow(dead_code, unused_variables)]
|
||||
|
||||
mod components;
|
||||
mod element_ext;
|
||||
mod elements;
|
||||
mod elevation;
|
||||
pub mod prelude;
|
||||
|
@ -27,7 +26,6 @@ mod static_data;
|
|||
mod theme;
|
||||
|
||||
pub use components::*;
|
||||
pub use element_ext::*;
|
||||
pub use elements::*;
|
||||
pub use prelude::*;
|
||||
pub use static_data::*;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
pub use gpui2::{
|
||||
div, Element, ElementId, Component, ParentElement, SharedString, StatefulInteractive,
|
||||
div, Component, Element, ElementId, ParentElement, SharedString, StatefulInteractive,
|
||||
StatelessInteractive, Styled, ViewContext, WindowContext,
|
||||
};
|
||||
|
||||
pub use crate::elevation::*;
|
||||
use crate::settings::user_settings;
|
||||
pub use crate::{old_theme, theme, ButtonVariant, ElementExt, Theme};
|
||||
pub use crate::{old_theme, theme, ButtonVariant, Theme};
|
||||
|
||||
use gpui2::{rems, Hsla, Rems};
|
||||
use strum::EnumIter;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue