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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user