From 4df6df8f06b7d56354be33d7ca63227357050e5a Mon Sep 17 00:00:00 2001 From: Simon Klee Date: Wed, 18 Nov 2026 10:03:50 +0100 Subject: [PATCH] refactor(cli-rs): name the type of a dialog surface's close Clippy refused the boxed closure PanelMount::close returned as too complex; Closing names it. --- packages/cli-rs/crates/plugin/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/cli-rs/crates/plugin/src/lib.rs b/packages/cli-rs/crates/plugin/src/lib.rs index de98cf74a1f..e508b22f9e3 100644 --- a/packages/cli-rs/crates/plugin/src/lib.rs +++ b/packages/cli-rs/crates/plugin/src/lib.rs @@ -3439,6 +3439,9 @@ impl Registry { /// A mounted panel surface of a plugin (P2): it ends when it drops. pub struct PanelMount(Box); +/// What tells a dialog surface's handler that its dialog closed ([`PanelMount::close`]). +pub type Closing = Box; + impl PanelMount { /// Takes the host's theme in place, keeping its widgets and their state; false when it must mount again. pub fn restyle(&self, host: &dyn Host) -> bool { @@ -3447,7 +3450,7 @@ impl PanelMount { /// Ends the mount of a dialog surface whose dialog closed: what it returns tells its handler /// ([`abi::interact::Event::Closed`]), as the plugin's call, once the host calls it. - pub fn close(self) -> Option> { + pub fn close(self) -> Option { self.0.closing() }