From 71ad7e7612b537f6e8ffb27e9c47c7c5318a909a Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 18 May 2023 09:01:38 -0700 Subject: [PATCH] Define empty theme for tests regardless of cargo features Co-authored-by: Kirill --- crates/file_finder/Cargo.toml | 1 + crates/settings/src/settings_file.rs | 1 - crates/theme/src/theme_registry.rs | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/file_finder/Cargo.toml b/crates/file_finder/Cargo.toml index 0349d26408..cae3fa25ca 100644 --- a/crates/file_finder/Cargo.toml +++ b/crates/file_finder/Cargo.toml @@ -26,6 +26,7 @@ postage.workspace = true gpui = { path = "../gpui", features = ["test-support"] } language = { path = "../language", features = ["test-support"] } workspace = { path = "../workspace", features = ["test-support"] } +theme = { path = "../theme", features = ["test-support"] } serde_json.workspace = true ctor.workspace = true diff --git a/crates/settings/src/settings_file.rs b/crates/settings/src/settings_file.rs index 30848713d9..cca2909da2 100644 --- a/crates/settings/src/settings_file.rs +++ b/crates/settings/src/settings_file.rs @@ -24,7 +24,6 @@ pub fn default_settings() -> Cow<'static, str> { } } -#[cfg(any(test, feature = "test-support"))] pub const EMPTY_THEME_NAME: &'static str = "empty-theme"; #[cfg(any(test, feature = "test-support"))] diff --git a/crates/theme/src/theme_registry.rs b/crates/theme/src/theme_registry.rs index 12ccaf3d51..8565bc3b56 100644 --- a/crates/theme/src/theme_registry.rs +++ b/crates/theme/src/theme_registry.rs @@ -30,7 +30,6 @@ impl ThemeRegistry { font_cache, }); - #[cfg(any(test, feature = "test-support"))] this.themes.lock().insert( settings::EMPTY_THEME_NAME.to_string(), gpui::fonts::with_font_cache(this.font_cache.clone(), || {