From d6d00f59a222186de355629ad6e8ed20b68a90ea Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Mon, 9 Sep 2024 14:38:52 +0800 Subject: [PATCH] Add `dump` default impl for Panel trait. --- crates/ui/src/dock/panel.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/ui/src/dock/panel.rs b/crates/ui/src/dock/panel.rs index 2f459e65..b2a7261a 100644 --- a/crates/ui/src/dock/panel.rs +++ b/crates/ui/src/dock/panel.rs @@ -50,7 +50,9 @@ pub trait Panel: EventEmitter + FocusableView { } /// Dump the panel, used to serialize the panel. - fn dump(&self, cx: &AppContext) -> DockItemState; + fn dump(&self, _cx: &AppContext) -> DockItemState { + DockItemState::new(self.panel_name()) + } } pub trait PanelView: 'static + Send + Sync {