1- // TODO(cosmic): some macro generated code causing issues, remove after `VisualStudioDarkPlus` is
2- // gone
3- #![ allow( deprecated) ]
4-
51//! Contains extra theme definitions and the [`LazyThemeSet`] type
62//!
73//! The extra themes are provided in an [`EmbeddedLazyThemeSet`] which is just a newtype around a
@@ -108,8 +104,6 @@ impl EmbeddedLazyThemeSet {
108104 EmbeddedThemeName :: SolarizedLight ,
109105 EmbeddedThemeName :: SublimeSnazzy ,
110106 EmbeddedThemeName :: TwoDark ,
111- #[ allow( deprecated) ]
112- EmbeddedThemeName :: VisualStudioDarkPlus ,
113107 EmbeddedThemeName :: Zenburn ,
114108 ]
115109 }
@@ -390,18 +384,6 @@ pub enum EmbeddedThemeName {
390384 /// </span><span style="color:#98c379;">"no" </span><span style="color:#abb2bf;">= </span><span style="color:#c678dd;">if </span><span style="color:#d19a66;">1 </span><span style="color:#abb2bf;">== </span><span style="color:#d19a66;">0</span><span style="color:#abb2bf;">, </span><span style="color:#d19a66;">do: </span><span style="color:#98c379;">"yes"</span><span style="color:#abb2bf;">, </span><span style="color:#d19a66;">else: </span><span style="color:#98c379;">"no"
391385 /// </span></pre>
392386 TwoDark ,
393- /// Visual Studio Dark+
394- ///
395- /// <pre style="background-color:#1e1e1e;">
396- /// <span style="color:#608b4e;"># There currently is no ternary operator like true ? "yes" : "no"
397- /// </span><span style="color:#608b4e;"># So the following is suggested
398- /// </span><span style="color:#d69d85;">"no" </span><span style="color:#dcdcdc;">= </span><span style="color:#c586c0;">if </span><span style="color:#b5cea8;">1 </span><span style="color:#dcdcdc;">== </span><span style="color:#b5cea8;">0</span><span style="color:#dcdcdc;">, </span><span style="color:#b4cea8;">do: </span><span style="color:#d69d85;">"yes"</span><span style="color:#dcdcdc;">, </span><span style="color:#b4cea8;">else: </span><span style="color:#d69d85;">"no"
399- /// </span></pre>
400- #[ deprecated(
401- since = "0.4.5" ,
402- note = "This theme will be removed from this enum in 0.5.0, then removed entirely sometime later"
403- ) ]
404- VisualStudioDarkPlus ,
405387 /// zenburn
406388 ///
407389 /// <pre style="background-color:#3f3f3f;">
@@ -425,8 +407,8 @@ impl EmbeddedThemeName {
425407 /// "1337",
426408 /// );
427409 /// assert_eq!(
428- /// EmbeddedThemeName::VisualStudioDarkPlus .as_name(),
429- /// "Visual Studio Dark+ ",
410+ /// EmbeddedThemeName::SolarizedDark .as_name(),
411+ /// "Solarized (dark) ",
430412 /// );
431413 /// ```
432414 pub fn as_name ( self ) -> & ' static str {
@@ -462,8 +444,6 @@ impl EmbeddedThemeName {
462444 Self :: SolarizedLight => "Solarized (light)" ,
463445 Self :: SublimeSnazzy => "Sublime Snazzy" ,
464446 Self :: TwoDark => "TwoDark" ,
465- #[ allow( deprecated) ]
466- Self :: VisualStudioDarkPlus => "Visual Studio Dark+" ,
467447 Self :: Zenburn => "zenburn" ,
468448 }
469449 }
@@ -491,7 +471,12 @@ mod tests {
491471 let _ = theme_set. get ( theme_name) ;
492472 }
493473
494- assert_eq ! ( theme_set. 0 . themes. len( ) , EmbeddedThemeName :: iter( ) . len( ) ) ;
474+ // ignoring `Visual Studio Dark+` as it will be removed later
475+ const NUM_IGNORED : usize = 1 ;
476+ assert_eq ! (
477+ theme_set. 0 . themes. len( ) - NUM_IGNORED ,
478+ EmbeddedThemeName :: iter( ) . len( )
479+ ) ;
495480 assert_eq ! (
496481 EmbeddedLazyThemeSet :: theme_names( ) . len( ) ,
497482 EmbeddedThemeName :: iter( ) . len( )
0 commit comments