diff --git a/crates/story/src/lib.rs b/crates/story/src/lib.rs index c13f562f..0dd0f5a6 100644 --- a/crates/story/src/lib.rs +++ b/crates/story/src/lib.rs @@ -472,7 +472,7 @@ impl Panel for StoryContainer { println!("panel: {} zoomed: {}", self.name, zoomed); } - fn set_active(&self, active: bool, _window: &Window, _cx: &App) { + fn set_active(&mut self, active: bool, _window: &Window, _cx: &App) { println!("panel: {} active: {}", self.name, active); } diff --git a/crates/ui/src/dock/panel.rs b/crates/ui/src/dock/panel.rs index 2b83e13c..d29d46eb 100644 --- a/crates/ui/src/dock/panel.rs +++ b/crates/ui/src/dock/panel.rs @@ -95,8 +95,7 @@ pub trait Panel: EventEmitter + Render + Focusable { /// This method will be called when the panel is active or inactive. /// /// The last_active_panel and current_active_panel will be touched when the panel is active. - #[allow(unused_variables)] - fn set_active(&self, active: bool, window: &Window, cx: &App) {} + fn set_active(&mut self, active: bool, window: &Window, cx: &App) {} /// Set zoomed state of the panel. ///