From 4ba57d730ba676c7d3e88a43c48265ed570e8870 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 16 May 2024 09:30:29 -0400 Subject: [PATCH] Make `SyntaxTheme::new_test` only available in tests (#11909) This PR addresses a TODO comment by making `SyntaxTheme::new_test` only available in tests. We needed to make it available when the `test-support` feature was enabled for it to be used in tests outside of the `theme` crate. Release Notes: - N/A --- crates/theme/src/styles/syntax.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/theme/src/styles/syntax.rs b/crates/theme/src/styles/syntax.rs index d6189f73e3..4e17f4b507 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) -> Self { SyntaxTheme { highlights: colors