diff --git a/gpui/src/elements.rs b/gpui/src/elements.rs index 7acd5cadad..6d7429222c 100644 --- a/gpui/src/elements.rs +++ b/gpui/src/elements.rs @@ -5,7 +5,7 @@ mod container; mod empty; mod event_handler; mod flex; -mod hooks; +mod hook; mod label; mod line_box; mod list; @@ -24,7 +24,7 @@ pub use container::*; pub use empty::*; pub use event_handler::*; pub use flex::*; -pub use hooks::*; +pub use hook::*; pub use label::*; pub use line_box::*; pub use list::*; diff --git a/gpui/src/elements/hooks.rs b/gpui/src/elements/hook.rs similarity index 96% rename from gpui/src/elements/hooks.rs rename to gpui/src/elements/hook.rs index 9337578297..994d5fe281 100644 --- a/gpui/src/elements/hooks.rs +++ b/gpui/src/elements/hook.rs @@ -5,12 +5,12 @@ use crate::{ SizeConstraint, }; -pub struct Hooks { +pub struct Hook { child: ElementBox, after_layout: Option>, } -impl Hooks { +impl Hook { pub fn new(child: ElementBox) -> Self { Self { child, @@ -27,7 +27,7 @@ impl Hooks { } } -impl Element for Hooks { +impl Element for Hook { type LayoutState = (); type PaintState = (); diff --git a/zed/src/workspace/sidebar.rs b/zed/src/workspace/sidebar.rs index afe4b328f2..71946b50ac 100644 --- a/zed/src/workspace/sidebar.rs +++ b/zed/src/workspace/sidebar.rs @@ -116,7 +116,7 @@ impl Sidebar { container.add_child( Flexible::new( 1., - Hooks::new( + Hook::new( ConstrainedBox::new(ChildView::new(active_item.id()).boxed()) .with_max_width(*self.width.borrow()) .boxed(),