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 0349d26408b9888e54e2b6e6e4a9769218306593..cae3fa25caf1907e28f7921689ee02407cfa1845 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 30848713d9ce4bff41ca06ecc965e26594efe887..cca2909da22dba93842304b87c600e2b05a99ae4 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 12ccaf3d519c754d9d8fafee79aafe05300c1d82..8565bc3b567ab04f0d68ae6637da5c498d595084 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(), || {