Skip to content

Commit 847fe75

Browse files
feat: remove deprecated items
1 parent 85915d8 commit 847fe75

File tree

3 files changed

+8
-53
lines changed

3 files changed

+8
-53
lines changed

src/lib.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -199,21 +199,6 @@ syntect = { version = ..., default-features = false, features = ["default-fancy"
199199
two-face = { version = ..., default-features = false, features = ["syntect-fancy"] }"#
200200
);
201201

202-
/// Returns a link to a page listing acknowledgements for all syntax and theme definitions
203-
///
204-
/// Available without having to bundle all of the acknowledgement info in your binary
205-
///
206-
/// ```
207-
/// assert_eq!(
208-
/// two_face::acknowledgement_url(),
209-
/// "https://github.com/CosmicHorrorDev/two-face/blob/v0.5.0-rc1/generated/acknowledgements_full.md"
210-
/// );
211-
/// ```
212-
#[deprecated(since = "0.4.5", note = "Moved to `two_face::acknowledgement::url()`")]
213-
pub fn acknowledgement_url() -> &'static str {
214-
acknowledgement::url()
215-
}
216-
217202
// TODO: add more extensive tests later
218203
#[cfg(test)]
219204
mod tests {

src/theme/mod.rs

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
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;">&quot;no&quot; </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;">&quot;yes&quot;</span><span style="color:#abb2bf;">, </span><span style="color:#d19a66;">else: </span><span style="color:#98c379;">&quot;no&quot;
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 ? &quot;yes&quot; : &quot;no&quot;
397-
/// </span><span style="color:#608b4e;"># So the following is suggested
398-
/// </span><span style="color:#d69d85;">&quot;no&quot; </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;">&quot;yes&quot;</span><span style="color:#dcdcdc;">, </span><span style="color:#b4cea8;">else: </span><span style="color:#d69d85;">&quot;no&quot;
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()

tests/docs_watchdog/theme.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -445,21 +445,6 @@ fn two_dark() {
445445
);
446446
}
447447

448-
#[test]
449-
#[expect(deprecated)]
450-
fn visual_studio_dark_plus() {
451-
insta::assert_snapshot!(
452-
sample_html(EmbeddedThemeName::VisualStudioDarkPlus),
453-
@r###"
454-
<pre style="background-color:#1e1e1e;">
455-
<span style="color:#608b4e;"># There currently is no ternary operator like true ? &quot;yes&quot; : &quot;no&quot;
456-
</span><span style="color:#608b4e;"># So the following is suggested
457-
</span><span style="color:#d69d85;">&quot;no&quot; </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;">&quot;yes&quot;</span><span style="color:#dcdcdc;">, </span><span style="color:#b4cea8;">else: </span><span style="color:#d69d85;">&quot;no&quot;
458-
</span></pre>
459-
"###
460-
);
461-
}
462-
463448
#[test]
464449
fn zenburn() {
465450
insta::assert_snapshot!(

0 commit comments

Comments
 (0)