Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7e7f101

Browse files
committed
Fix feature attributes "ansi_term" to "color"
1 parent c66d784 commit 7e7f101

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎src/formatter/mod.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pub mod style;
77

88
use self::style::{Style, StyleClass, Stylesheet};
99

10-
#[cfg(feature = "ansi_term")]
10+
#[cfg(feature = "color")]
1111
use crate::stylesheets::color::AnsiTermStylesheet;
1212
use crate::{display_list::*, stylesheets::no_color::NoColorStylesheet};
1313

@@ -26,7 +26,7 @@ fn is_annotation_empty(annotation: &Annotation<'_>) -> bool {
2626
.all(|fragment| fragment.content.is_empty())
2727
}
2828

29-
#[cfg(feature = "ansi_term")]
29+
#[cfg(feature = "color")]
3030
#[inline]
3131
pub fn get_term_style(color: bool) -> Box<dyn Stylesheet> {
3232
if color {
@@ -36,7 +36,7 @@ pub fn get_term_style(color: bool) -> Box<dyn Stylesheet> {
3636
}
3737
}
3838

39-
#[cfg(not(feature = "ansi_term"))]
39+
#[cfg(not(feature = "color"))]
4040
#[inline]
4141
pub fn get_term_style(_color: bool) -> Box<dyn Stylesheet> {
4242
Box::new(NoColorStylesheet)

‎src/stylesheets/mod.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
//! By default the `no_color` is available. If the crate gets compiled
77
//! with `ansi_term`, the `color` stylesheet is added.
88
9-
#[cfg(feature = "ansi_term")]
9+
#[cfg(feature = "color")]
1010
pub mod color;
1111
pub mod no_color;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /