Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Define empty theme for tests regardless of cargo features

Max Brunsfeld71ad7e7612b5
diff --git a/crates/file_finder/Cargo.toml b/crates/file_finder/Cargo.toml
index 0349d26408b..cae3fa25caf 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 30848713d9c..cca2909da22 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 12ccaf3d519..8565bc3b567 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(), || {