chore: Remove outline dependency from breadcrumbs (#22504)

This slashes our incremental dev times (touch editor) by 0.6s
(8.1->7.6s) due to unblocking terminal_view build sooner.

Closes #ISSUE

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-12-30 13:08:26 +01:00 committed by GitHub
parent 5f4f3a9c87
commit 3f33ca01a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 43 additions and 16 deletions

View file

@ -151,3 +151,13 @@ pub struct Rerun {
}
impl_actions!(task, [Spawn, Rerun]);
pub mod outline {
use std::sync::OnceLock;
use gpui::{action_as, AnyView, WindowContext};
action_as!(outline, ToggleOutline as Toggle);
/// A pointer to outline::toggle function, exposed here to sewer the breadcrumbs <-> outline dependency.
pub static TOGGLE_OUTLINE: OnceLock<fn(AnyView, &mut WindowContext<'_>)> = OnceLock::new();
}