Skip to content

Commit b42b946

Browse files
authored
Merge pull request #33 from botika/master
Fix feature attributes "ansi_term" to "color"
2 parents c66d784 + 7e7f101 commit b42b946

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/formatter/mod.rs

+3-3
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

+1-1
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)