workspace: Remove excess clone (#30226)

Remove excess clone when invoking callback in workspace

Release Notes:

- N/A
This commit is contained in:
tidely 2025-05-08 12:31:43 +02:00 committed by GitHub
parent fcf066aff5
commit e8b67872ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5359,7 +5359,7 @@ impl Workspace {
self.workspace_actions.push(Box::new(move |div, _, cx| {
let callback = callback.clone();
div.on_action(cx.listener(move |workspace, event, window, cx| {
(callback.clone())(workspace, event, window, cx)
(callback)(workspace, event, window, cx)
}))
}));
self