From 6a3974ddbb1bb39c1b719238bf10a03c4081a95e Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Tue, 31 Oct 2023 13:08:18 +0200 Subject: [PATCH] Remove TODOs --- crates/project2/src/project2.rs | 35 ++++++++++++++------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/crates/project2/src/project2.rs b/crates/project2/src/project2.rs index fe062a78a4..4f422bb0e2 100644 --- a/crates/project2/src/project2.rs +++ b/crates/project2/src/project2.rs @@ -162,8 +162,7 @@ pub struct Project { copilot_log_subscription: Option, current_lsp_settings: HashMap, LspSettings>, node: Option>, - // TODO kb uncomment - // #[cfg(not(any(test, feature = "test-support")))] + #[cfg(not(any(test, feature = "test-support")))] default_prettier: Option, prettier_instances: HashMap< (Option, PathBuf), @@ -171,8 +170,7 @@ pub struct Project { >, } -// TODO kb uncomment -// #[cfg(not(any(test, feature = "test-support")))] +#[cfg(not(any(test, feature = "test-support")))] struct DefaultPrettier { installation_process: Option>>, installed_plugins: HashSet<&'static str>, @@ -688,8 +686,7 @@ impl Project { copilot_log_subscription: None, current_lsp_settings: ProjectSettings::get_global(cx).lsp.clone(), node: Some(node), - // TODO kb uncomment - // #[cfg(not(any(test, feature = "test-support")))] + #[cfg(not(any(test, feature = "test-support")))] default_prettier: None, prettier_instances: HashMap::default(), } @@ -792,8 +789,7 @@ impl Project { copilot_log_subscription: None, current_lsp_settings: ProjectSettings::get_global(cx).lsp.clone(), node: None, - // TODO kb uncomment - // #[cfg(not(any(test, feature = "test-support")))] + #[cfg(not(any(test, feature = "test-support")))] default_prettier: None, prettier_instances: HashMap::default(), }; @@ -8568,19 +8564,18 @@ impl Project { } } - // TODO kb uncomment - // #[cfg(any(test, feature = "test-support"))] - // fn install_default_formatters( - // &mut self, - // _: Option, - // _: &Language, - // _: &LanguageSettings, - // _: &mut ModelContext, - // ) -> Task> { - // Task::ready(Ok(())) - // } + #[cfg(any(test, feature = "test-support"))] + fn install_default_formatters( + &mut self, + _: Option, + _: &Language, + _: &LanguageSettings, + _: &mut ModelContext, + ) -> Task> { + Task::ready(Ok(())) + } - // #[cfg(not(any(test, feature = "test-support")))] + #[cfg(not(any(test, feature = "test-support")))] fn install_default_formatters( &mut self, worktree: Option,