aboutsummaryrefslogtreecommitdiff
path: root/src/color.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/color.rs')
-rw-r--r--src/color.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/color.rs b/src/color.rs
index c35f482..e7cb60c 100644
--- a/src/color.rs
+++ b/src/color.rs
@@ -13,6 +13,7 @@ impl <T: Display> Display for Colored<T> {
fn fmt(&self, fmt: &mut Formatter) -> fmt::Result {
match self {
Colored::Color(t, before) => {
+ use crossterm::style::Stylize;
write!(fmt, "{}", style::style(t).with(*before))
},
Colored::Just(t) => {
@@ -136,12 +137,10 @@ mod termion_color {
use crossterm::style;
- use serde::Serialize;
-
use crate::color::{Colored, YaxColors};
#[cfg(feature="use-serde")]
- impl Serialize for ColorSettings {
+ impl serde::Serialize for ColorSettings {
fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
use serde::ser::SerializeStruct;
let s = serializer.serialize_struct("ColorSettings", 0)?;