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.

Make `SyntaxTheme::new_test` only available in tests (#11909)

Marshall Bowers4ba57d730ba6
diff --git a/crates/theme/src/styles/syntax.rs b/crates/theme/src/styles/syntax.rs
index d6189f73e3e..4e17f4b507e 100644
--- a/crates/theme/src/styles/syntax.rs
+++ b/crates/theme/src/styles/syntax.rs
@@ -127,7 +127,7 @@ impl SyntaxTheme {
}
}
- // TODO: Get this working with `#[cfg(test)]`. Why isn't it?
+ #[cfg(any(test, feature = "test-support"))]
pub fn new_test(colors: impl IntoIterator<Item = (&'static str, Hsla)>) -> Self {
SyntaxTheme {
highlights: colors